This patch is largely modeled on the relatively-straightforward code for Fortran cross-compilation, so there might be some intricacies missing.pull/2938/head
parent
7eb6a29180
commit
1d81efb03d
6 changed files with 62 additions and 19 deletions
@ -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', |
||||
] |
||||
``` |
Loading…
Reference in new issue