From df531317b162e1afa34ac850aa997514434c2f82 Mon Sep 17 00:00:00 2001
From: Weihang Lo
Date: Fri, 17 Jun 2022 22:56:42 +0800
Subject: [PATCH] Update docs for -Zmultitarget stabilization
---
src/doc/man/cargo-bench.md | 1 +
src/doc/man/cargo-build.md | 1 +
src/doc/man/cargo-check.md | 1 +
src/doc/man/cargo-clean.md | 1 +
src/doc/man/cargo-doc.md | 1 +
src/doc/man/cargo-fetch.md | 1 +
src/doc/man/cargo-fix.md | 1 +
src/doc/man/cargo-package.md | 1 +
src/doc/man/cargo-publish.md | 1 +
src/doc/man/cargo-rustc.md | 1 +
src/doc/man/cargo-rustdoc.md | 1 +
src/doc/man/cargo-test.md | 1 +
src/doc/man/generated_txt/cargo-bench.txt | 3 +-
src/doc/man/generated_txt/cargo-build.txt | 3 +-
src/doc/man/generated_txt/cargo-check.txt | 3 +-
src/doc/man/generated_txt/cargo-clean.txt | 3 +-
src/doc/man/generated_txt/cargo-doc.txt | 3 +-
src/doc/man/generated_txt/cargo-fetch.txt | 3 +-
src/doc/man/generated_txt/cargo-fix.txt | 3 +-
src/doc/man/generated_txt/cargo-package.txt | 3 +-
src/doc/man/generated_txt/cargo-publish.txt | 3 +-
src/doc/man/generated_txt/cargo-rustc.txt | 3 +-
src/doc/man/generated_txt/cargo-rustdoc.txt | 3 +-
src/doc/man/generated_txt/cargo-test.txt | 3 +-
src/doc/man/includes/options-target-triple.md | 1 +
src/doc/src/commands/cargo-bench.md | 3 +-
src/doc/src/commands/cargo-build.md | 3 +-
src/doc/src/commands/cargo-check.md | 3 +-
src/doc/src/commands/cargo-clean.md | 3 +-
src/doc/src/commands/cargo-doc.md | 3 +-
src/doc/src/commands/cargo-fetch.md | 3 +-
src/doc/src/commands/cargo-fix.md | 3 +-
src/doc/src/commands/cargo-package.md | 3 +-
src/doc/src/commands/cargo-publish.md | 3 +-
src/doc/src/commands/cargo-rustc.md | 3 +-
src/doc/src/commands/cargo-rustdoc.md | 3 +-
src/doc/src/commands/cargo-test.md | 3 +-
src/doc/src/reference/config.md | 15 ++++++--
src/doc/src/reference/unstable.md | 35 ++++---------------
src/etc/man/cargo-bench.1 | 2 +-
src/etc/man/cargo-build.1 | 2 +-
src/etc/man/cargo-check.1 | 2 +-
src/etc/man/cargo-clean.1 | 2 +-
src/etc/man/cargo-doc.1 | 2 +-
src/etc/man/cargo-fetch.1 | 2 +-
src/etc/man/cargo-fix.1 | 2 +-
src/etc/man/cargo-package.1 | 2 +-
src/etc/man/cargo-publish.1 | 2 +-
src/etc/man/cargo-rustc.1 | 2 +-
src/etc/man/cargo-rustdoc.1 | 2 +-
src/etc/man/cargo-test.1 | 2 +-
51 files changed, 92 insertions(+), 67 deletions(-)
diff --git a/src/doc/man/cargo-bench.md b/src/doc/man/cargo-bench.md
index f43e5b24f868..1155ac50b92c 100644
--- a/src/doc/man/cargo-bench.md
+++ b/src/doc/man/cargo-bench.md
@@ -1,6 +1,7 @@
# cargo-bench(1)
{{*set actionverb="Benchmark"}}
{{*set nouns="benchmarks"}}
+{{*set multitarget=true}}
## NAME
diff --git a/src/doc/man/cargo-build.md b/src/doc/man/cargo-build.md
index e4dc63f5b28b..3b71ae6a3171 100644
--- a/src/doc/man/cargo-build.md
+++ b/src/doc/man/cargo-build.md
@@ -1,5 +1,6 @@
# cargo-build(1)
{{*set actionverb="Build"}}
+{{*set multitarget=true}}
## NAME
diff --git a/src/doc/man/cargo-check.md b/src/doc/man/cargo-check.md
index 208cd273406c..44a3d0fdc4d9 100644
--- a/src/doc/man/cargo-check.md
+++ b/src/doc/man/cargo-check.md
@@ -1,5 +1,6 @@
# cargo-check(1)
{{*set actionverb="Check"}}
+{{*set multitarget=true}}
## NAME
diff --git a/src/doc/man/cargo-clean.md b/src/doc/man/cargo-clean.md
index aa6315632483..be1fa1fce454 100644
--- a/src/doc/man/cargo-clean.md
+++ b/src/doc/man/cargo-clean.md
@@ -1,5 +1,6 @@
# cargo-clean(1)
{{*set actionverb="Clean"}}
+{{*set multitarget=true}}
## NAME
diff --git a/src/doc/man/cargo-doc.md b/src/doc/man/cargo-doc.md
index 5e33541395f1..f8f517d9ae70 100644
--- a/src/doc/man/cargo-doc.md
+++ b/src/doc/man/cargo-doc.md
@@ -1,5 +1,6 @@
# cargo-doc(1)
{{*set actionverb="Document"}}
+{{*set multitarget=true}}
## NAME
diff --git a/src/doc/man/cargo-fetch.md b/src/doc/man/cargo-fetch.md
index 601ddb248cdc..69ce103cae30 100644
--- a/src/doc/man/cargo-fetch.md
+++ b/src/doc/man/cargo-fetch.md
@@ -1,6 +1,7 @@
# cargo-fetch(1)
{{*set actionverb="Fetch"}}
{{*set target-default-to-all-arch=true}}
+{{*set multitarget=true}}
## NAME
diff --git a/src/doc/man/cargo-fix.md b/src/doc/man/cargo-fix.md
index 53dfb4cc6225..e78ae34fd2e0 100644
--- a/src/doc/man/cargo-fix.md
+++ b/src/doc/man/cargo-fix.md
@@ -1,5 +1,6 @@
# cargo-fix(1)
{{*set actionverb="Fix"}}
+{{*set multitarget=true}}
## NAME
diff --git a/src/doc/man/cargo-package.md b/src/doc/man/cargo-package.md
index 1180df718efd..d7f35c6234c8 100644
--- a/src/doc/man/cargo-package.md
+++ b/src/doc/man/cargo-package.md
@@ -1,6 +1,7 @@
# cargo-package(1)
{{*set actionverb="Package"}}
{{*set noall=true}}
+{{*set multitarget=true}}
## NAME
diff --git a/src/doc/man/cargo-publish.md b/src/doc/man/cargo-publish.md
index 6033b238d4ad..560e3c104728 100644
--- a/src/doc/man/cargo-publish.md
+++ b/src/doc/man/cargo-publish.md
@@ -1,5 +1,6 @@
# cargo-publish(1)
{{*set actionverb="Publish"}}
+{{*set multitarget=true}}
## NAME
diff --git a/src/doc/man/cargo-rustc.md b/src/doc/man/cargo-rustc.md
index 32d3b0e5be7b..588c080a9e09 100644
--- a/src/doc/man/cargo-rustc.md
+++ b/src/doc/man/cargo-rustc.md
@@ -1,5 +1,6 @@
# cargo-rustc(1)
{{*set actionverb="Build"}}
+{{*set multitarget=true}}
## NAME
diff --git a/src/doc/man/cargo-rustdoc.md b/src/doc/man/cargo-rustdoc.md
index 2e4b6e21626b..6c38780f3244 100644
--- a/src/doc/man/cargo-rustdoc.md
+++ b/src/doc/man/cargo-rustdoc.md
@@ -1,5 +1,6 @@
# cargo-rustdoc(1)
{{*set actionverb="Document"}}
+{{*set multitarget=true}}
## NAME
diff --git a/src/doc/man/cargo-test.md b/src/doc/man/cargo-test.md
index b948d91c24cb..7419b5323979 100644
--- a/src/doc/man/cargo-test.md
+++ b/src/doc/man/cargo-test.md
@@ -1,6 +1,7 @@
# cargo-test(1)
{{*set actionverb="Test"}}
{{*set nouns="tests"}}
+{{*set multitarget=true}}
## NAME
diff --git a/src/doc/man/generated_txt/cargo-bench.txt b/src/doc/man/generated_txt/cargo-bench.txt
index 01afc593cacf..876442b09d8b 100644
--- a/src/doc/man/generated_txt/cargo-bench.txt
+++ b/src/doc/man/generated_txt/cargo-bench.txt
@@ -208,7 +208,8 @@ OPTIONS
Benchmark for the given architecture. The default is the host
architecture. The general format of the triple is
---. Run rustc --print target-list for
- a list of supported targets.
+ a list of supported targets. This flag may be specified multiple
+ times.
This may also be specified with the build.target config value
.
diff --git a/src/doc/man/generated_txt/cargo-build.txt b/src/doc/man/generated_txt/cargo-build.txt
index 17802b7fe6d0..2fbf8982dc16 100644
--- a/src/doc/man/generated_txt/cargo-build.txt
+++ b/src/doc/man/generated_txt/cargo-build.txt
@@ -140,7 +140,8 @@ OPTIONS
Build for the given architecture. The default is the host
architecture. The general format of the triple is
---. Run rustc --print target-list for
- a list of supported targets.
+ a list of supported targets. This flag may be specified multiple
+ times.
This may also be specified with the build.target config value
.
diff --git a/src/doc/man/generated_txt/cargo-check.txt b/src/doc/man/generated_txt/cargo-check.txt
index 2efb2edc87e0..4287350809eb 100644
--- a/src/doc/man/generated_txt/cargo-check.txt
+++ b/src/doc/man/generated_txt/cargo-check.txt
@@ -137,7 +137,8 @@ OPTIONS
Check for the given architecture. The default is the host
architecture. The general format of the triple is
---. Run rustc --print target-list for
- a list of supported targets.
+ a list of supported targets. This flag may be specified multiple
+ times.
This may also be specified with the build.target config value
.
diff --git a/src/doc/man/generated_txt/cargo-clean.txt b/src/doc/man/generated_txt/cargo-clean.txt
index a4888cfdfc41..76bdf3fef060 100644
--- a/src/doc/man/generated_txt/cargo-clean.txt
+++ b/src/doc/man/generated_txt/cargo-clean.txt
@@ -43,7 +43,8 @@ OPTIONS
Clean for the given architecture. The default is the host
architecture. The general format of the triple is
---. Run rustc --print target-list for
- a list of supported targets.
+ a list of supported targets. This flag may be specified multiple
+ times.
This may also be specified with the build.target config value
.
diff --git a/src/doc/man/generated_txt/cargo-doc.txt b/src/doc/man/generated_txt/cargo-doc.txt
index b57035384c1e..8e2c7faae811 100644
--- a/src/doc/man/generated_txt/cargo-doc.txt
+++ b/src/doc/man/generated_txt/cargo-doc.txt
@@ -115,7 +115,8 @@ OPTIONS
Document for the given architecture. The default is the host
architecture. The general format of the triple is
---. Run rustc --print target-list for
- a list of supported targets.
+ a list of supported targets. This flag may be specified multiple
+ times.
This may also be specified with the build.target config value
.
diff --git a/src/doc/man/generated_txt/cargo-fetch.txt b/src/doc/man/generated_txt/cargo-fetch.txt
index afd3fc377911..43aa77eae706 100644
--- a/src/doc/man/generated_txt/cargo-fetch.txt
+++ b/src/doc/man/generated_txt/cargo-fetch.txt
@@ -28,7 +28,8 @@ OPTIONS
Fetch for the given architecture. The default is all architectures.
The general format of the triple is
---. Run rustc --print target-list for
- a list of supported targets.
+ a list of supported targets. This flag may be specified multiple
+ times.
This may also be specified with the build.target config value
.
diff --git a/src/doc/man/generated_txt/cargo-fix.txt b/src/doc/man/generated_txt/cargo-fix.txt
index c5520bb6e343..df48eba7e399 100644
--- a/src/doc/man/generated_txt/cargo-fix.txt
+++ b/src/doc/man/generated_txt/cargo-fix.txt
@@ -210,7 +210,8 @@ OPTIONS
Fix for the given architecture. The default is the host
architecture. The general format of the triple is
---. Run rustc --print target-list for
- a list of supported targets.
+ a list of supported targets. This flag may be specified multiple
+ times.
This may also be specified with the build.target config value
.
diff --git a/src/doc/man/generated_txt/cargo-package.txt b/src/doc/man/generated_txt/cargo-package.txt
index 89a6b652d937..66c03c2be739 100644
--- a/src/doc/man/generated_txt/cargo-package.txt
+++ b/src/doc/man/generated_txt/cargo-package.txt
@@ -112,7 +112,8 @@ OPTIONS
Package for the given architecture. The default is the host
architecture. The general format of the triple is
---. Run rustc --print target-list for
- a list of supported targets.
+ a list of supported targets. This flag may be specified multiple
+ times.
This may also be specified with the build.target config value
.
diff --git a/src/doc/man/generated_txt/cargo-publish.txt b/src/doc/man/generated_txt/cargo-publish.txt
index fc63a9c0a2db..4e53da191f2d 100644
--- a/src/doc/man/generated_txt/cargo-publish.txt
+++ b/src/doc/man/generated_txt/cargo-publish.txt
@@ -79,7 +79,8 @@ OPTIONS
Publish for the given architecture. The default is the host
architecture. The general format of the triple is
---. Run rustc --print target-list for
- a list of supported targets.
+ a list of supported targets. This flag may be specified multiple
+ times.
This may also be specified with the build.target config value
.
diff --git a/src/doc/man/generated_txt/cargo-rustc.txt b/src/doc/man/generated_txt/cargo-rustc.txt
index b0f2ff3f622f..e971052d14c5 100644
--- a/src/doc/man/generated_txt/cargo-rustc.txt
+++ b/src/doc/man/generated_txt/cargo-rustc.txt
@@ -131,7 +131,8 @@ OPTIONS
Build for the given architecture. The default is the host
architecture. The general format of the triple is
---. Run rustc --print target-list for
- a list of supported targets.
+ a list of supported targets. This flag may be specified multiple
+ times.
This may also be specified with the build.target config value
.
diff --git a/src/doc/man/generated_txt/cargo-rustdoc.txt b/src/doc/man/generated_txt/cargo-rustdoc.txt
index b45e229a8a92..6d7e4ebeb89c 100644
--- a/src/doc/man/generated_txt/cargo-rustdoc.txt
+++ b/src/doc/man/generated_txt/cargo-rustdoc.txt
@@ -131,7 +131,8 @@ OPTIONS
Document for the given architecture. The default is the host
architecture. The general format of the triple is
---. Run rustc --print target-list for
- a list of supported targets.
+ a list of supported targets. This flag may be specified multiple
+ times.
This may also be specified with the build.target config value
.
diff --git a/src/doc/man/generated_txt/cargo-test.txt b/src/doc/man/generated_txt/cargo-test.txt
index d0fe9df36a02..b63eaa67bbfd 100644
--- a/src/doc/man/generated_txt/cargo-test.txt
+++ b/src/doc/man/generated_txt/cargo-test.txt
@@ -222,7 +222,8 @@ OPTIONS
Test for the given architecture. The default is the host
architecture. The general format of the triple is
---. Run rustc --print target-list for
- a list of supported targets.
+ a list of supported targets. This flag may be specified multiple
+ times.
This may also be specified with the build.target config value
.
diff --git a/src/doc/man/includes/options-target-triple.md b/src/doc/man/includes/options-target-triple.md
index 9d91de66ceaf..bb180f53d7af 100644
--- a/src/doc/man/includes/options-target-triple.md
+++ b/src/doc/man/includes/options-target-triple.md
@@ -5,6 +5,7 @@
{{~/if}} The general format of the triple is
`---`. Run `rustc --print target-list` for a
list of supported targets.
+{{~#if multitarget }} This flag may be specified multiple times. {{~/if}}
This may also be specified with the `build.target`
[config value](../reference/config.html).
diff --git a/src/doc/src/commands/cargo-bench.md b/src/doc/src/commands/cargo-bench.md
index 69bee8ddb92b..edf5f5e2749c 100644
--- a/src/doc/src/commands/cargo-bench.md
+++ b/src/doc/src/commands/cargo-bench.md
@@ -2,6 +2,7 @@
+
## NAME
cargo-bench - Execute benchmarks of a package
@@ -255,7 +256,7 @@ be specified multiple times, which enables all specified features.
--target
triple
Benchmark for the given architecture. The default is the host architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>
. Run rustc --print target-list
for a
-list of supported targets.
+list of supported targets. This flag may be specified multiple times.
This may also be specified with the build.target
config value.
Note that specifying this flag makes Cargo run in a different mode where the
diff --git a/src/doc/src/commands/cargo-build.md b/src/doc/src/commands/cargo-build.md
index 3f473de7a7dc..b69012142b92 100644
--- a/src/doc/src/commands/cargo-build.md
+++ b/src/doc/src/commands/cargo-build.md
@@ -1,6 +1,7 @@
# cargo-build(1)
+
## NAME
cargo-build - Compile the current package
@@ -182,7 +183,7 @@ be specified multiple times, which enables all specified features.
--target
triple
Build for the given architecture. The default is the host architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>
. Run rustc --print target-list
for a
-list of supported targets.
+list of supported targets. This flag may be specified multiple times.
This may also be specified with the build.target
config value.
Note that specifying this flag makes Cargo run in a different mode where the
diff --git a/src/doc/src/commands/cargo-check.md b/src/doc/src/commands/cargo-check.md
index 7ea0651901af..16935a756a6b 100644
--- a/src/doc/src/commands/cargo-check.md
+++ b/src/doc/src/commands/cargo-check.md
@@ -1,6 +1,7 @@
# cargo-check(1)
+
## NAME
cargo-check - Check the current package
@@ -177,7 +178,7 @@ be specified multiple times, which enables all specified features.
--target
triple
Check for the given architecture. The default is the host architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>
. Run rustc --print target-list
for a
-list of supported targets.
+list of supported targets. This flag may be specified multiple times.
This may also be specified with the build.target
config value.
Note that specifying this flag makes Cargo run in a different mode where the
diff --git a/src/doc/src/commands/cargo-clean.md b/src/doc/src/commands/cargo-clean.md
index d2e46620471b..eee69854dc64 100644
--- a/src/doc/src/commands/cargo-clean.md
+++ b/src/doc/src/commands/cargo-clean.md
@@ -1,6 +1,7 @@
# cargo-clean(1)
+
## NAME
cargo-clean - Remove generated artifacts
@@ -59,7 +60,7 @@ Defaults to target
in the root of the workspace.
--target
triple
Clean for the given architecture. The default is the host architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>
. Run rustc --print target-list
for a
-list of supported targets.
+list of supported targets. This flag may be specified multiple times.
This may also be specified with the build.target
config value.
Note that specifying this flag makes Cargo run in a different mode where the
diff --git a/src/doc/src/commands/cargo-doc.md b/src/doc/src/commands/cargo-doc.md
index b28020c9d746..5bcd73689e7b 100644
--- a/src/doc/src/commands/cargo-doc.md
+++ b/src/doc/src/commands/cargo-doc.md
@@ -1,6 +1,7 @@
# cargo-doc(1)
+
## NAME
cargo-doc - Build a package's documentation
@@ -155,7 +156,7 @@ be specified multiple times, which enables all specified features.
--target
triple
Document for the given architecture. The default is the host architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>
. Run rustc --print target-list
for a
-list of supported targets.
+list of supported targets. This flag may be specified multiple times.
This may also be specified with the build.target
config value.
Note that specifying this flag makes Cargo run in a different mode where the
diff --git a/src/doc/src/commands/cargo-fetch.md b/src/doc/src/commands/cargo-fetch.md
index 7cdd4543e132..9248fb98aebe 100644
--- a/src/doc/src/commands/cargo-fetch.md
+++ b/src/doc/src/commands/cargo-fetch.md
@@ -2,6 +2,7 @@
+
## NAME
cargo-fetch - Fetch dependencies of a package from the network
@@ -34,7 +35,7 @@ you plan to use Cargo without a network with the `--offline` flag.
--target
triple
Fetch for the given architecture. The default is all architectures. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>
. Run rustc --print target-list
for a
-list of supported targets.
+list of supported targets. This flag may be specified multiple times.
This may also be specified with the build.target
config value.
Note that specifying this flag makes Cargo run in a different mode where the
diff --git a/src/doc/src/commands/cargo-fix.md b/src/doc/src/commands/cargo-fix.md
index d75d81a44bfe..85ca570f8eae 100644
--- a/src/doc/src/commands/cargo-fix.md
+++ b/src/doc/src/commands/cargo-fix.md
@@ -1,6 +1,7 @@
# cargo-fix(1)
+
## NAME
cargo-fix - Automatically fix lint warnings reported by rustc
@@ -257,7 +258,7 @@ be specified multiple times, which enables all specified features.
--target
triple
Fix for the given architecture. The default is the host architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>
. Run rustc --print target-list
for a
-list of supported targets.
+list of supported targets. This flag may be specified multiple times.
This may also be specified with the build.target
config value.
Note that specifying this flag makes Cargo run in a different mode where the
diff --git a/src/doc/src/commands/cargo-package.md b/src/doc/src/commands/cargo-package.md
index 568880a0d481..1a9dac0b7995 100644
--- a/src/doc/src/commands/cargo-package.md
+++ b/src/doc/src/commands/cargo-package.md
@@ -2,6 +2,7 @@
+
## NAME
cargo-package - Assemble the local package into a distributable tarball
@@ -133,7 +134,7 @@ single quotes or double quotes around each pattern.
--target
triple
Package for the given architecture. The default is the host architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>
. Run rustc --print target-list
for a
-list of supported targets.
+list of supported targets. This flag may be specified multiple times.
This may also be specified with the build.target
config value.
Note that specifying this flag makes Cargo run in a different mode where the
diff --git a/src/doc/src/commands/cargo-publish.md b/src/doc/src/commands/cargo-publish.md
index e4489416e06d..af5c12776f9e 100644
--- a/src/doc/src/commands/cargo-publish.md
+++ b/src/doc/src/commands/cargo-publish.md
@@ -1,6 +1,7 @@
# cargo-publish(1)
+
## NAME
cargo-publish - Upload a package to the registry
@@ -99,7 +100,7 @@ format.
--target
triple
Publish for the given architecture. The default is the host architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>
. Run rustc --print target-list
for a
-list of supported targets.
+list of supported targets. This flag may be specified multiple times.
This may also be specified with the build.target
config value.
Note that specifying this flag makes Cargo run in a different mode where the
diff --git a/src/doc/src/commands/cargo-rustc.md b/src/doc/src/commands/cargo-rustc.md
index 7396d679e2e9..f0d85718e1d0 100644
--- a/src/doc/src/commands/cargo-rustc.md
+++ b/src/doc/src/commands/cargo-rustc.md
@@ -1,6 +1,7 @@
# cargo-rustc(1)
+
## NAME
cargo-rustc - Compile the current package, and pass extra options to the compiler
@@ -169,7 +170,7 @@ be specified multiple times, which enables all specified features.
--target
triple
Build for the given architecture. The default is the host architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>
. Run rustc --print target-list
for a
-list of supported targets.
+list of supported targets. This flag may be specified multiple times.
This may also be specified with the build.target
config value.
Note that specifying this flag makes Cargo run in a different mode where the
diff --git a/src/doc/src/commands/cargo-rustdoc.md b/src/doc/src/commands/cargo-rustdoc.md
index 1fe506d108ed..8f795050519a 100644
--- a/src/doc/src/commands/cargo-rustdoc.md
+++ b/src/doc/src/commands/cargo-rustdoc.md
@@ -1,6 +1,7 @@
# cargo-rustdoc(1)
+
## NAME
cargo-rustdoc - Build a package's documentation, using specified custom flags
@@ -174,7 +175,7 @@ be specified multiple times, which enables all specified features.
--target
triple
Document for the given architecture. The default is the host architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>
. Run rustc --print target-list
for a
-list of supported targets.
+list of supported targets. This flag may be specified multiple times.
This may also be specified with the build.target
config value.
Note that specifying this flag makes Cargo run in a different mode where the
diff --git a/src/doc/src/commands/cargo-test.md b/src/doc/src/commands/cargo-test.md
index 9ff65a107239..8e7a812e9952 100644
--- a/src/doc/src/commands/cargo-test.md
+++ b/src/doc/src/commands/cargo-test.md
@@ -2,6 +2,7 @@
+
## NAME
cargo-test - Execute unit and integration tests of a package
@@ -269,7 +270,7 @@ be specified multiple times, which enables all specified features.
--target
triple
Test for the given architecture. The default is the host architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>
. Run rustc --print target-list
for a
-list of supported targets.
+list of supported targets. This flag may be specified multiple times.
This may also be specified with the build.target
config value.
Note that specifying this flag makes Cargo run in a different mode where the
diff --git a/src/doc/src/reference/config.md b/src/doc/src/reference/config.md
index f4749457e7a5..ee4430fb360d 100644
--- a/src/doc/src/reference/config.md
+++ b/src/doc/src/reference/config.md
@@ -380,16 +380,25 @@ It affects the filename hash so that artifacts produced by the wrapper are cache
Sets the executable to use for `rustdoc`.
##### `build.target`
-* Type: string
+* Type: string or array of strings
* Default: host platform
* Environment: `CARGO_BUILD_TARGET`
-The default target platform triple to compile to.
+The default target platform triples to compile to.
-This may also be a relative path to a `.json` target spec file.
+This allows passing either a string or an array of strings. Each string value
+is a target platform triple. The selected build targets will be built for each
+of the selected architectures.
+
+The string value may also be a relative path to a `.json` target spec file.
Can be overridden with the `--target` CLI option.
+```toml
+[build]
+target = ["x86_64-unknown-linux-gnu", "i686-unknown-linux-gnu"]
+```
+
##### `build.target-dir`
* Type: string (path)
* Default: "target"
diff --git a/src/doc/src/reference/unstable.md b/src/doc/src/reference/unstable.md
index 3d0031180da1..446b5190d906 100644
--- a/src/doc/src/reference/unstable.md
+++ b/src/doc/src/reference/unstable.md
@@ -48,7 +48,7 @@ how the feature works:
```toml
[unstable]
mtime-on-use = true
- multitarget = true
+ build-std = ["core", "alloc"]
```
Each new feature described below should explain how to use it.
@@ -76,7 +76,6 @@ Each new feature described below should explain how to use it.
* Compile behavior
* [mtime-on-use](#mtime-on-use) — Updates the last-modified timestamp on every dependency every time it is used, to provide a mechanism to delete unused artifacts.
* [doctest-xcompile](#doctest-xcompile) — Supports running doctests with the `--target` flag.
- * [multitarget](#multitarget) — Supports building for multiple targets at the same time.
* [build-std](#build-std) — Builds the standard library instead of using pre-built binaries.
* [build-std-features](#build-std-features) — Sets features to use with the standard library.
* [binary-dep-depinfo](#binary-dep-depinfo) — Causes the dep-info file to track binary dependencies.
@@ -217,32 +216,6 @@ information from `.cargo/config.toml`. See the rustc issue for more information.
cargo test --target foo -Zdoctest-xcompile
```
-### multitarget
-* Tracking Issue: [#8176](https://github.com/rust-lang/cargo/issues/8176)
-
-This flag allows passing multiple `--target` flags to the `cargo` subcommand
-selected. When multiple `--target` flags are passed the selected build targets
-will be built for each of the selected architectures.
-
-For example to compile a library for both 32 and 64-bit:
-
-```
-cargo build --target x86_64-unknown-linux-gnu --target i686-unknown-linux-gnu
-```
-
-or running tests for both targets:
-
-```
-cargo test --target x86_64-unknown-linux-gnu --target i686-unknown-linux-gnu
-```
-
-This can also be specified in `.cargo/config.toml` files.
-
-```toml
-[build]
-target = ["x86_64-unknown-linux-gnu", "i686-unknown-linux-gnu"]
-```
-
#### New `dir-name` attribute
Some of the paths generated under `target/` have resulted in a de-facto "build
@@ -1568,3 +1541,9 @@ unstable and require `-Zunstable-options`.)
The `--config` CLI option has been stabilized in the 1.63 release. See
the [config documentation](config.html#command-line-overrides) for more
information.
+
+### multitarget
+
+The `-Z multitarget` option has been stabilized in the 1.64 release.
+See [`build.target`](config.md#buildtarget) for more information about
+setting the default target platform triples.
diff --git a/src/etc/man/cargo-bench.1 b/src/etc/man/cargo-bench.1
index 002f7562a212..21e07fbbcd66 100644
--- a/src/etc/man/cargo-bench.1
+++ b/src/etc/man/cargo-bench.1
@@ -257,7 +257,7 @@ Do not activate the \fBdefault\fR feature of the selected packages.
.RS 4
Benchmark for the given architecture. The default is the host architecture. The general format of the triple is
\fB\-\-\-\fR\&. Run \fBrustc \-\-print target\-list\fR for a
-list of supported targets.
+list of supported targets. This flag may be specified multiple times.
.sp
This may also be specified with the \fBbuild.target\fR
\fIconfig value\fR \&.
diff --git a/src/etc/man/cargo-build.1 b/src/etc/man/cargo-build.1
index edbc8f90b61a..8ddfd5482543 100644
--- a/src/etc/man/cargo-build.1
+++ b/src/etc/man/cargo-build.1
@@ -168,7 +168,7 @@ Do not activate the \fBdefault\fR feature of the selected packages.
.RS 4
Build for the given architecture. The default is the host architecture. The general format of the triple is
\fB\-\-\-\fR\&. Run \fBrustc \-\-print target\-list\fR for a
-list of supported targets.
+list of supported targets. This flag may be specified multiple times.
.sp
This may also be specified with the \fBbuild.target\fR
\fIconfig value\fR \&.
diff --git a/src/etc/man/cargo-check.1 b/src/etc/man/cargo-check.1
index a8ecef5f7b1c..4e39a23e40d6 100644
--- a/src/etc/man/cargo-check.1
+++ b/src/etc/man/cargo-check.1
@@ -164,7 +164,7 @@ Do not activate the \fBdefault\fR feature of the selected packages.
.RS 4
Check for the given architecture. The default is the host architecture. The general format of the triple is
\fB\-\-\-\fR\&. Run \fBrustc \-\-print target\-list\fR for a
-list of supported targets.
+list of supported targets. This flag may be specified multiple times.
.sp
This may also be specified with the \fBbuild.target\fR
\fIconfig value\fR \&.
diff --git a/src/etc/man/cargo-clean.1 b/src/etc/man/cargo-clean.1
index b326a7f1ca71..f0181fb5554d 100644
--- a/src/etc/man/cargo-clean.1
+++ b/src/etc/man/cargo-clean.1
@@ -53,7 +53,7 @@ Defaults to \fBtarget\fR in the root of the workspace.
.RS 4
Clean for the given architecture. The default is the host architecture. The general format of the triple is
\fB\-\-\-\fR\&. Run \fBrustc \-\-print target\-list\fR for a
-list of supported targets.
+list of supported targets. This flag may be specified multiple times.
.sp
This may also be specified with the \fBbuild.target\fR
\fIconfig value\fR \&.
diff --git a/src/etc/man/cargo-doc.1 b/src/etc/man/cargo-doc.1
index 5d3ffc2dd2a5..aa06c1033daf 100644
--- a/src/etc/man/cargo-doc.1
+++ b/src/etc/man/cargo-doc.1
@@ -137,7 +137,7 @@ Do not activate the \fBdefault\fR feature of the selected packages.
.RS 4
Document for the given architecture. The default is the host architecture. The general format of the triple is
\fB\-\-\-\fR\&. Run \fBrustc \-\-print target\-list\fR for a
-list of supported targets.
+list of supported targets. This flag may be specified multiple times.
.sp
This may also be specified with the \fBbuild.target\fR
\fIconfig value\fR \&.
diff --git a/src/etc/man/cargo-fetch.1 b/src/etc/man/cargo-fetch.1
index f69fff8e8099..b87bbf9694cf 100644
--- a/src/etc/man/cargo-fetch.1
+++ b/src/etc/man/cargo-fetch.1
@@ -27,7 +27,7 @@ you plan to use Cargo without a network with the \fB\-\-offline\fR flag.
.RS 4
Fetch for the given architecture. The default is all architectures. The general format of the triple is
\fB\-\-\-\fR\&. Run \fBrustc \-\-print target\-list\fR for a
-list of supported targets.
+list of supported targets. This flag may be specified multiple times.
.sp
This may also be specified with the \fBbuild.target\fR
\fIconfig value\fR \&.
diff --git a/src/etc/man/cargo-fix.1 b/src/etc/man/cargo-fix.1
index 3aaa1f89bce3..95a75d6a59af 100644
--- a/src/etc/man/cargo-fix.1
+++ b/src/etc/man/cargo-fix.1
@@ -259,7 +259,7 @@ Do not activate the \fBdefault\fR feature of the selected packages.
.RS 4
Fix for the given architecture. The default is the host architecture. The general format of the triple is
\fB\-\-\-\fR\&. Run \fBrustc \-\-print target\-list\fR for a
-list of supported targets.
+list of supported targets. This flag may be specified multiple times.
.sp
This may also be specified with the \fBbuild.target\fR
\fIconfig value\fR \&.
diff --git a/src/etc/man/cargo-package.1 b/src/etc/man/cargo-package.1
index 6e451ada63b6..6504d243d1a7 100644
--- a/src/etc/man/cargo-package.1
+++ b/src/etc/man/cargo-package.1
@@ -148,7 +148,7 @@ single quotes or double quotes around each pattern.
.RS 4
Package for the given architecture. The default is the host architecture. The general format of the triple is
\fB\-\-\-\fR\&. Run \fBrustc \-\-print target\-list\fR for a
-list of supported targets.
+list of supported targets. This flag may be specified multiple times.
.sp
This may also be specified with the \fBbuild.target\fR
\fIconfig value\fR \&.
diff --git a/src/etc/man/cargo-publish.1 b/src/etc/man/cargo-publish.1
index aa2490ed0eb6..6417023d3f6f 100644
--- a/src/etc/man/cargo-publish.1
+++ b/src/etc/man/cargo-publish.1
@@ -98,7 +98,7 @@ format.
.RS 4
Publish for the given architecture. The default is the host architecture. The general format of the triple is
\fB\-\-\-\fR\&. Run \fBrustc \-\-print target\-list\fR for a
-list of supported targets.
+list of supported targets. This flag may be specified multiple times.
.sp
This may also be specified with the \fBbuild.target\fR
\fIconfig value\fR \&.
diff --git a/src/etc/man/cargo-rustc.1 b/src/etc/man/cargo-rustc.1
index 07076e244630..e1571c41b85d 100644
--- a/src/etc/man/cargo-rustc.1
+++ b/src/etc/man/cargo-rustc.1
@@ -154,7 +154,7 @@ Do not activate the \fBdefault\fR feature of the selected packages.
.RS 4
Build for the given architecture. The default is the host architecture. The general format of the triple is
\fB\-\-\-\fR\&. Run \fBrustc \-\-print target\-list\fR for a
-list of supported targets.
+list of supported targets. This flag may be specified multiple times.
.sp
This may also be specified with the \fBbuild.target\fR
\fIconfig value\fR \&.
diff --git a/src/etc/man/cargo-rustdoc.1 b/src/etc/man/cargo-rustdoc.1
index 34a37d52f616..ce8fc408af89 100644
--- a/src/etc/man/cargo-rustdoc.1
+++ b/src/etc/man/cargo-rustdoc.1
@@ -156,7 +156,7 @@ Do not activate the \fBdefault\fR feature of the selected packages.
.RS 4
Document for the given architecture. The default is the host architecture. The general format of the triple is
\fB\-\-\-\fR\&. Run \fBrustc \-\-print target\-list\fR for a
-list of supported targets.
+list of supported targets. This flag may be specified multiple times.
.sp
This may also be specified with the \fBbuild.target\fR
\fIconfig value\fR \&.
diff --git a/src/etc/man/cargo-test.1 b/src/etc/man/cargo-test.1
index 00fe416d5a24..662cb1bdb638 100644
--- a/src/etc/man/cargo-test.1
+++ b/src/etc/man/cargo-test.1
@@ -269,7 +269,7 @@ Do not activate the \fBdefault\fR feature of the selected packages.
.RS 4
Test for the given architecture. The default is the host architecture. The general format of the triple is
\fB\-\-\-\fR\&. Run \fBrustc \-\-print target\-list\fR for a
-list of supported targets.
+list of supported targets. This flag may be specified multiple times.
.sp
This may also be specified with the \fBbuild.target\fR
\fIconfig value\fR \&.