Skip to content

Commit de8e67f

Browse files
authored
Update cross-compilation.md
Added information how to configure the linker for a specific target.
1 parent c33cb5e commit de8e67f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

doc/src/cross-compilation.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ installing the NDK components as well.
3030

3131
[Android NDK]: https://developer.android.com/tools/sdk/ndk/index.html
3232

33+
To tell cargo which linker it should use for a specific target, you can add the
34+
following lines to `~/.cargo/config`:
35+
```console
36+
[target.armv7-unknown-linux-gnueabihf]
37+
linker = "arm-linux-gnueabihf-gcc-5.3.1"
38+
```
39+
3340
To install a target for a toolchain that isn't the default toolchain use the
3441
`--toolchain` argument of `rustup target add`, like so:
3542

0 commit comments

Comments
 (0)