@@ -321,7 +321,7 @@ all capital letters.
321
321
322
322
This section documents all configuration keys. The description for keys with
323
323
variable parts are annotated with angled brackets like ` target.<triple> ` where
324
- the ` <triple> ` part can be any target triple like
324
+ the [ ` <triple> ` ] part can be any [ target triple] like
325
325
` target.x86_64-pc-windows-msvc ` .
326
326
327
327
#### ` paths `
@@ -418,7 +418,7 @@ Sets the executable to use for `rustdoc`.
418
418
* Default: host platform
419
419
* Environment: ` CARGO_BUILD_TARGET `
420
420
421
- The default target platform triples to compile to.
421
+ The default [ target platform triples] [ target triple ] to compile to.
422
422
423
423
This allows passing either a string or an array of strings. Each string value
424
424
is a target platform triple. The selected build targets will be built for each
@@ -468,7 +468,7 @@ for the host, such as build scripts or proc macros, will not receive the args.
468
468
Without ` --target ` , the flags will be passed to all compiler invocations
469
469
(including build scripts and proc macros) because dependencies are shared. If
470
470
you have args that you do not want to pass to build scripts or proc macros and
471
- are building for the host, pass ` --target ` with the host triple.
471
+ are building for the host, pass ` --target ` with the [ host triple] [ target triple ] .
472
472
473
473
It is not recommended to pass in flags that Cargo itself usually manages. For
474
474
example, the flags driven by [ profiles] ( profiles.md ) are best handled by setting the
@@ -1048,9 +1048,9 @@ If none of `branch`, `tag`, or `rev` is set, defaults to the `master` branch.
1048
1048
#### ` [target] `
1049
1049
1050
1050
The ` [target] ` table is used for specifying settings for specific platform
1051
- targets. It consists of a sub-table which is either a platform triple or a
1052
- [ ` cfg() ` expression] . The given values will be used if the target platform
1053
- matches either the ` <triple> ` value or the ` <cfg> ` expression.
1051
+ targets. It consists of a sub-table which is either a [ platform triple] [ target triple ]
1052
+ or a [ ` cfg() ` expression] . The given values will be used if the target platform
1053
+ matches either the [ ` <triple> ` ] value or the ` <cfg> ` expression.
1054
1054
1055
1055
``` toml
1056
1056
[target .thumbv7m-none-eabi ]
@@ -1068,7 +1068,7 @@ to view), values set by [build scripts], and extra `--cfg` flags passed to
1068
1068
` rustc ` (such as those defined in ` RUSTFLAGS ` ). Do not try to match on
1069
1069
` debug_assertions ` or Cargo features like ` feature="foo" ` .
1070
1070
1071
- If using a target spec JSON file, the ` <triple> ` value is the filename stem.
1071
+ If using a target spec JSON file, the [ ` <triple> ` ] value is the filename stem.
1072
1072
For example ` --target foo/bar.json ` would match ` [target.bar] ` .
1073
1073
1074
1074
##### ` target.<triple>.ar `
@@ -1081,22 +1081,22 @@ This option is deprecated and unused.
1081
1081
* Environment: ` CARGO_TARGET_<triple>_LINKER `
1082
1082
1083
1083
Specifies the linker which is passed to ` rustc ` (via [ ` -C linker ` ] ) when the
1084
- ` <triple> ` is being compiled for. By default, the linker is not overridden.
1084
+ [ ` <triple> ` ] is being compiled for. By default, the linker is not overridden.
1085
1085
1086
1086
##### ` target.<triple>.runner `
1087
1087
* Type: string or array of strings ([ program path with args] )
1088
1088
* Default: none
1089
1089
* Environment: ` CARGO_TARGET_<triple>_RUNNER `
1090
1090
1091
- If a runner is provided, executables for the target ` <triple> ` will be
1091
+ If a runner is provided, executables for the target [ ` <triple> ` ] will be
1092
1092
executed by invoking the specified runner with the actual executable passed as
1093
1093
an argument. This applies to [ ` cargo run ` ] , [ ` cargo test ` ] and [ ` cargo bench ` ]
1094
1094
commands. By default, compiled executables are executed directly.
1095
1095
1096
1096
##### ` target.<cfg>.runner `
1097
1097
1098
1098
This is similar to the [ target runner] ( #targettriplerunner ) , but using
1099
- a [ ` cfg() ` expression] . If both a ` <triple> ` and ` <cfg> ` runner match,
1099
+ a [ ` cfg() ` expression] . If both a [ ` <triple> ` ] and ` <cfg> ` runner match,
1100
1100
the ` <triple> ` will take precedence. It is an error if more than one
1101
1101
` <cfg> ` runner matches the current target.
1102
1102
@@ -1105,16 +1105,16 @@ the `<triple>` will take precedence. It is an error if more than one
1105
1105
* Default: none
1106
1106
* Environment: ` CARGO_TARGET_<triple>_RUSTFLAGS `
1107
1107
1108
- Passes a set of custom flags to the compiler for this ` <triple> ` . The value
1109
- may be an array of strings or a space-separated string.
1108
+ Passes a set of custom flags to the compiler for this [ ` <triple> ` ] .
1109
+ The value may be an array of strings or a space-separated string.
1110
1110
1111
1111
See [ ` build.rustflags ` ] ( #buildrustflags ) for more details on the different
1112
1112
ways to specific extra flags.
1113
1113
1114
1114
##### ` target.<cfg>.rustflags `
1115
1115
1116
1116
This is similar to the [ target rustflags] ( #targettriplerustflags ) , but
1117
- using a [ ` cfg() ` expression] . If several ` <cfg> ` and ` <triple> ` entries
1117
+ using a [ ` cfg() ` expression] . If several ` <cfg> ` and [ ` <triple> ` ] entries
1118
1118
match the current target, the flags are joined together.
1119
1119
1120
1120
##### ` target.<triple>.<links> `
@@ -1214,3 +1214,5 @@ Sets the width for progress bar.
1214
1214
[ revision ] : https://git-scm.com/docs/gitrevisions
1215
1215
[ registries ] : registries.md
1216
1216
[ crates.io ] : https://crates.io/
1217
+ [ target triple ] : ../appendix/glossary.md#target ' "target" (glossary) '
1218
+ [ `<triple>` ] : ../appendix/glossary.md#target ' "target" (glossary) '
0 commit comments