Skip to content

Commit 64f4e2f

Browse files
authored
Refer to cargo book instead
1 parent de8e67f commit 64f4e2f

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

doc/src/cross-compilation.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,11 @@ Note that `rustup target add` only installs the Rust standard library for a
2626
given target. There are typically other tools necessary to cross-compile,
2727
particularly a linker. For example, to cross compile to Android the [Android
2828
NDK] must be installed. In the future, `rustup` will provide assistance
29-
installing the NDK components as well.
29+
installing the NDK components as well. See the [target section] of the
30+
`cargo` configuration for how to setup a linker to use for a certain target.
3031

3132
[Android NDK]: https://developer.android.com/tools/sdk/ndk/index.html
32-
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-
```
33+
[target section]: https://doc.rust-lang.org/cargo/reference/config.html#target
3934

4035
To install a target for a toolchain that isn't the default toolchain use the
4136
`--toolchain` argument of `rustup target add`, like so:

0 commit comments

Comments
 (0)