diff options
author | Adam C. Foltzer <acfoltzer@galois.com> | 2018-01-11 16:04:40 -0800 |
---|---|---|
committer | Adam C. Foltzer <acfoltzer@galois.com> | 2018-01-29 15:47:05 -0800 |
commit | 1d81efb03d5efee5899db01737880b1b3969e1fc (patch) | |
tree | 5333fba87ba73d881364934454ebdaaaf98cc7b0 /docs/markdown | |
parent | 7eb6a2918080fce37df7e6d25194d46ed98f0f35 (diff) | |
download | meson-1d81efb03d5efee5899db01737880b1b3969e1fc.zip meson-1d81efb03d5efee5899db01737880b1b3969e1fc.tar.gz meson-1d81efb03d5efee5899db01737880b1b3969e1fc.tar.bz2 |
Add cross-compilation support for `rustc`
This patch is largely modeled on the relatively-straightforward code
for Fortran cross-compilation, so there might be some intricacies
missing.
Diffstat (limited to 'docs/markdown')
-rw-r--r-- | docs/markdown/snippets/rust-cross.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/markdown/snippets/rust-cross.md b/docs/markdown/snippets/rust-cross.md new file mode 100644 index 0000000..7f18c44 --- /dev/null +++ b/docs/markdown/snippets/rust-cross.md @@ -0,0 +1,16 @@ +## Rust cross-compilation + +Cross-compilation is now supported for Rust targets. Like other +cross-compilers, the Rust binary must be specified in your cross +file. It should specify a `--target` (as installed by `rustup target`) +and a custom linker pointing to your C cross-compiler. For example: + +``` +[binaries] +c = '/usr/bin/arm-linux-gnueabihf-gcc-7' +rust = [ + 'rustc', + '--target', 'arm-unknown-linux-gnueabihf', + '-C', 'linker=/usr/bin/arm-linux-gnueabihf-gcc-7', +] +``` |