Skip to content

Commit 40a615e

Browse files
committed
added links to 'target' in documentation for unstable section of the reference
1 parent 30a0daf commit 40a615e

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

src/doc/src/reference/unstable.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -459,17 +459,19 @@ CLI paths are relative to the current working directory.
459459
* Tracking Issue: [#9453](https://github.com/rust-lang/cargo/issues/9453)
460460

461461
Historically, Cargo's behavior for whether the `linker` and `rustflags`
462-
configuration options from environment variables and `[target]` are
463-
respected for build scripts, plugins, and other artifacts that are
464-
_always_ built for the host platform has been somewhat inconsistent.
462+
configuration options from environment variables and
463+
[`[target]`](config.md#target) are respected for build scripts, plugins,
464+
and other artifacts that are _always_ built for the host platform has
465+
been somewhat inconsistent.
465466
When `--target` is _not_ passed, Cargo respects the same `linker` and
466467
`rustflags` for build scripts as for all other compile artifacts. When
467468
`--target` _is_ passed, however, Cargo respects `linker` from
468-
`[target.<host triple>]`, and does not pick up any `rustflags`
469-
configuration. This dual behavior is confusing, but also makes it
470-
difficult to correctly configure builds where the host triple and the
471-
target triple happen to be the same, but artifacts intended to run on
472-
the build host should still be configured differently.
469+
[`[target.<host triple>]`](config.md#targettriplelinker), and does not
470+
pick up any `rustflags` configuration.
471+
This dual behavior is confusing, but also makes it difficult to correctly
472+
configure builds where the host triple and the [target triple] happen to
473+
be the same, but artifacts intended to run on the build host should still
474+
be configured differently.
473475

474476
`-Ztarget-applies-to-host` enables the top-level
475477
`target-applies-to-host` setting in Cargo configuration files which
@@ -1432,7 +1434,7 @@ information.
14321434

14331435
The `-Z multitarget` option has been stabilized in the 1.64 release.
14341436
See [`build.target`](config.md#buildtarget) for more information about
1435-
setting the default target platform triples.
1437+
setting the default [target platform triples][target triple].
14361438

14371439
### crate-type
14381440

@@ -1459,3 +1461,5 @@ terminal where Cargo can automatically detect the width.
14591461

14601462
Sparse registry support has been stabilized in the 1.68 release.
14611463
See [Registry Protocols](registries.md#registry-protocols) for more information.
1464+
1465+
[target triple]: ../appendix/glossary.md#target '"target" (glossary)'

0 commit comments

Comments
 (0)