@@ -459,17 +459,19 @@ CLI paths are relative to the current working directory.
459
459
* Tracking Issue: [ #9453 ] ( https://github.com/rust-lang/cargo/issues/9453 )
460
460
461
461
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.
465
466
When ` --target ` is _ not_ passed, Cargo respects the same ` linker ` and
466
467
` rustflags ` for build scripts as for all other compile artifacts. When
467
468
` --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.
473
475
474
476
` -Ztarget-applies-to-host ` enables the top-level
475
477
` target-applies-to-host ` setting in Cargo configuration files which
@@ -1432,7 +1434,7 @@ information.
1432
1434
1433
1435
The ` -Z multitarget ` option has been stabilized in the 1.64 release.
1434
1436
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 ] .
1436
1438
1437
1439
### crate-type
1438
1440
@@ -1459,3 +1461,5 @@ terminal where Cargo can automatically detect the width.
1459
1461
1460
1462
Sparse registry support has been stabilized in the 1.68 release.
1461
1463
See [ Registry Protocols] ( registries.md#registry-protocols ) for more information.
1464
+
1465
+ [ target triple ] : ../appendix/glossary.md#target ' "target" (glossary) '
0 commit comments