Commit b11261f7 authored by Federico Mena Quintero's avatar Federico Mena Quintero

Merge branch 'ffontaine/librsvg-master'

parents 7598fed7 d11d958a
Pipeline #14271 failed with stages
in 7 minutes and 7 seconds
......@@ -200,6 +200,17 @@ compiler's source code.
You can check Jorge Aparicio's [guide on cross-compilation for
Rust][rust-cross] for more details.
## Overriding the Rust target name
If you need `cargo --target=FOO` to obtain a different value from the
one you specified for `--host=TRIPLE`, you can use the `RUST_TARGET`
variable, and this will be passed to `cargo`. For example,
```sh
RUST_TARGET=aarch64-unknown-linux-gnu ./configure --host=aarch64-buildroot-linux-gnu
# will run "cargo --target=aarch64-unknown-linux-gnu" for the Rust part
```
## Cross-compiling to a target not supported by Rust out of the box
When building with a target that is not supported out of the box by
......
......@@ -136,7 +136,7 @@ CARGO_RELEASE_ARGS=--release
endif
if CROSS_COMPILING
CARGO_TARGET_ARGS=--target=$(host)
CARGO_TARGET_ARGS=--target=$(RUST_TARGET)
endif
CARGO_VERBOSE = $(cargo_verbose_$(V))
......
......@@ -286,9 +286,14 @@ else
fi
AM_CONDITIONAL([DEBUG_RELEASE], [test "x$debug_release" = "xyes"])
AC_ARG_VAR(RUST_TARGET, [Set rust target (default=$host)])
if test "x$RUST_TARGET" == x; then
RUST_TARGET=$host
fi
AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
if test "x$cross_compiling" = "xyes" ; then
RUST_TARGET_SUBDIR="$host/$RUST_TARGET_SUBDIR"
RUST_TARGET_SUBDIR="$RUST_TARGET/$RUST_TARGET_SUBDIR"
fi
AC_SUBST([RUST_TARGET_SUBDIR])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment