Update docs for -Zmultitarget stabilization

This commit is contained in:
Weihang Lo 2022-06-17 22:56:42 +08:00
parent db3b5801d7
commit 3e177e0f45
No known key found for this signature in database
GPG Key ID: D7DBF189825E82E7
51 changed files with 92 additions and 67 deletions

View File

@ -1,6 +1,7 @@
# cargo-bench(1) # cargo-bench(1)
{{*set actionverb="Benchmark"}} {{*set actionverb="Benchmark"}}
{{*set nouns="benchmarks"}} {{*set nouns="benchmarks"}}
{{*set multitarget=true}}
## NAME ## NAME

View File

@ -1,5 +1,6 @@
# cargo-build(1) # cargo-build(1)
{{*set actionverb="Build"}} {{*set actionverb="Build"}}
{{*set multitarget=true}}
## NAME ## NAME

View File

@ -1,5 +1,6 @@
# cargo-check(1) # cargo-check(1)
{{*set actionverb="Check"}} {{*set actionverb="Check"}}
{{*set multitarget=true}}
## NAME ## NAME

View File

@ -1,5 +1,6 @@
# cargo-clean(1) # cargo-clean(1)
{{*set actionverb="Clean"}} {{*set actionverb="Clean"}}
{{*set multitarget=true}}
## NAME ## NAME

View File

@ -1,5 +1,6 @@
# cargo-doc(1) # cargo-doc(1)
{{*set actionverb="Document"}} {{*set actionverb="Document"}}
{{*set multitarget=true}}
## NAME ## NAME

View File

@ -1,6 +1,7 @@
# cargo-fetch(1) # cargo-fetch(1)
{{*set actionverb="Fetch"}} {{*set actionverb="Fetch"}}
{{*set target-default-to-all-arch=true}} {{*set target-default-to-all-arch=true}}
{{*set multitarget=true}}
## NAME ## NAME

View File

@ -1,5 +1,6 @@
# cargo-fix(1) # cargo-fix(1)
{{*set actionverb="Fix"}} {{*set actionverb="Fix"}}
{{*set multitarget=true}}
## NAME ## NAME

View File

@ -1,6 +1,7 @@
# cargo-package(1) # cargo-package(1)
{{*set actionverb="Package"}} {{*set actionverb="Package"}}
{{*set noall=true}} {{*set noall=true}}
{{*set multitarget=true}}
## NAME ## NAME

View File

@ -1,5 +1,6 @@
# cargo-publish(1) # cargo-publish(1)
{{*set actionverb="Publish"}} {{*set actionverb="Publish"}}
{{*set multitarget=true}}
## NAME ## NAME

View File

@ -1,5 +1,6 @@
# cargo-rustc(1) # cargo-rustc(1)
{{*set actionverb="Build"}} {{*set actionverb="Build"}}
{{*set multitarget=true}}
## NAME ## NAME

View File

@ -1,5 +1,6 @@
# cargo-rustdoc(1) # cargo-rustdoc(1)
{{*set actionverb="Document"}} {{*set actionverb="Document"}}
{{*set multitarget=true}}
## NAME ## NAME

View File

@ -1,6 +1,7 @@
# cargo-test(1) # cargo-test(1)
{{*set actionverb="Test"}} {{*set actionverb="Test"}}
{{*set nouns="tests"}} {{*set nouns="tests"}}
{{*set multitarget=true}}
## NAME ## NAME

View File

@ -208,7 +208,8 @@ OPTIONS
Benchmark for the given architecture. The default is the host Benchmark for the given architecture. The default is the host
architecture. The general format of the triple is architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>. Run rustc --print target-list for <arch><sub>-<vendor>-<sys>-<abi>. 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 This may also be specified with the build.target config value
<https://doc.rust-lang.org/cargo/reference/config.html>. <https://doc.rust-lang.org/cargo/reference/config.html>.

View File

@ -140,7 +140,8 @@ OPTIONS
Build for the given architecture. The default is the host Build for the given architecture. The default is the host
architecture. The general format of the triple is architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>. Run rustc --print target-list for <arch><sub>-<vendor>-<sys>-<abi>. 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 This may also be specified with the build.target config value
<https://doc.rust-lang.org/cargo/reference/config.html>. <https://doc.rust-lang.org/cargo/reference/config.html>.

View File

@ -137,7 +137,8 @@ OPTIONS
Check for the given architecture. The default is the host Check for the given architecture. The default is the host
architecture. The general format of the triple is architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>. Run rustc --print target-list for <arch><sub>-<vendor>-<sys>-<abi>. 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 This may also be specified with the build.target config value
<https://doc.rust-lang.org/cargo/reference/config.html>. <https://doc.rust-lang.org/cargo/reference/config.html>.

View File

@ -43,7 +43,8 @@ OPTIONS
Clean for the given architecture. The default is the host Clean for the given architecture. The default is the host
architecture. The general format of the triple is architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>. Run rustc --print target-list for <arch><sub>-<vendor>-<sys>-<abi>. 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 This may also be specified with the build.target config value
<https://doc.rust-lang.org/cargo/reference/config.html>. <https://doc.rust-lang.org/cargo/reference/config.html>.

View File

@ -115,7 +115,8 @@ OPTIONS
Document for the given architecture. The default is the host Document for the given architecture. The default is the host
architecture. The general format of the triple is architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>. Run rustc --print target-list for <arch><sub>-<vendor>-<sys>-<abi>. 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 This may also be specified with the build.target config value
<https://doc.rust-lang.org/cargo/reference/config.html>. <https://doc.rust-lang.org/cargo/reference/config.html>.

View File

@ -28,7 +28,8 @@ OPTIONS
Fetch for the given architecture. The default is all architectures. Fetch for the given architecture. The default is all architectures.
The general format of the triple is The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>. Run rustc --print target-list for <arch><sub>-<vendor>-<sys>-<abi>. 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 This may also be specified with the build.target config value
<https://doc.rust-lang.org/cargo/reference/config.html>. <https://doc.rust-lang.org/cargo/reference/config.html>.

View File

@ -210,7 +210,8 @@ OPTIONS
Fix for the given architecture. The default is the host Fix for the given architecture. The default is the host
architecture. The general format of the triple is architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>. Run rustc --print target-list for <arch><sub>-<vendor>-<sys>-<abi>. 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 This may also be specified with the build.target config value
<https://doc.rust-lang.org/cargo/reference/config.html>. <https://doc.rust-lang.org/cargo/reference/config.html>.

View File

@ -112,7 +112,8 @@ OPTIONS
Package for the given architecture. The default is the host Package for the given architecture. The default is the host
architecture. The general format of the triple is architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>. Run rustc --print target-list for <arch><sub>-<vendor>-<sys>-<abi>. 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 This may also be specified with the build.target config value
<https://doc.rust-lang.org/cargo/reference/config.html>. <https://doc.rust-lang.org/cargo/reference/config.html>.

View File

@ -79,7 +79,8 @@ OPTIONS
Publish for the given architecture. The default is the host Publish for the given architecture. The default is the host
architecture. The general format of the triple is architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>. Run rustc --print target-list for <arch><sub>-<vendor>-<sys>-<abi>. 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 This may also be specified with the build.target config value
<https://doc.rust-lang.org/cargo/reference/config.html>. <https://doc.rust-lang.org/cargo/reference/config.html>.

View File

@ -131,7 +131,8 @@ OPTIONS
Build for the given architecture. The default is the host Build for the given architecture. The default is the host
architecture. The general format of the triple is architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>. Run rustc --print target-list for <arch><sub>-<vendor>-<sys>-<abi>. 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 This may also be specified with the build.target config value
<https://doc.rust-lang.org/cargo/reference/config.html>. <https://doc.rust-lang.org/cargo/reference/config.html>.

View File

@ -131,7 +131,8 @@ OPTIONS
Document for the given architecture. The default is the host Document for the given architecture. The default is the host
architecture. The general format of the triple is architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>. Run rustc --print target-list for <arch><sub>-<vendor>-<sys>-<abi>. 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 This may also be specified with the build.target config value
<https://doc.rust-lang.org/cargo/reference/config.html>. <https://doc.rust-lang.org/cargo/reference/config.html>.

View File

@ -222,7 +222,8 @@ OPTIONS
Test for the given architecture. The default is the host Test for the given architecture. The default is the host
architecture. The general format of the triple is architecture. The general format of the triple is
<arch><sub>-<vendor>-<sys>-<abi>. Run rustc --print target-list for <arch><sub>-<vendor>-<sys>-<abi>. 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 This may also be specified with the build.target config value
<https://doc.rust-lang.org/cargo/reference/config.html>. <https://doc.rust-lang.org/cargo/reference/config.html>.

View File

@ -5,6 +5,7 @@
{{~/if}} The general format of the triple is {{~/if}} The general format of the triple is
`<arch><sub>-<vendor>-<sys>-<abi>`. Run `rustc --print target-list` for a `<arch><sub>-<vendor>-<sys>-<abi>`. Run `rustc --print target-list` for a
list of supported targets. list of supported targets.
{{~#if multitarget }} This flag may be specified multiple times. {{~/if}}
This may also be specified with the `build.target` This may also be specified with the `build.target`
[config value](../reference/config.html). [config value](../reference/config.html).

View File

@ -2,6 +2,7 @@
## NAME ## NAME
cargo-bench - Execute benchmarks of a package cargo-bench - Execute benchmarks of a package
@ -255,7 +256,7 @@ be specified multiple times, which enables all specified features.</dd>
<dt class="option-term" id="option-cargo-bench---target"><a class="option-anchor" href="#option-cargo-bench---target"></a><code>--target</code> <em>triple</em></dt> <dt class="option-term" id="option-cargo-bench---target"><a class="option-anchor" href="#option-cargo-bench---target"></a><code>--target</code> <em>triple</em></dt>
<dd class="option-desc">Benchmark for the given architecture. The default is the host architecture. The general format of the triple is <dd class="option-desc">Benchmark for the given architecture. The default is the host architecture. The general format of the triple is
<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>. Run <code>rustc --print target-list</code> for a <code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>. Run <code>rustc --print target-list</code> for a
list of supported targets.</p> list of supported targets. This flag may be specified multiple times.</p>
<p>This may also be specified with the <code>build.target</code> <p>This may also be specified with the <code>build.target</code>
<a href="../reference/config.html">config value</a>.</p> <a href="../reference/config.html">config value</a>.</p>
<p>Note that specifying this flag makes Cargo run in a different mode where the <p>Note that specifying this flag makes Cargo run in a different mode where the

View File

@ -1,6 +1,7 @@
# cargo-build(1) # cargo-build(1)
## NAME ## NAME
cargo-build - Compile the current package cargo-build - Compile the current package
@ -182,7 +183,7 @@ be specified multiple times, which enables all specified features.</dd>
<dt class="option-term" id="option-cargo-build---target"><a class="option-anchor" href="#option-cargo-build---target"></a><code>--target</code> <em>triple</em></dt> <dt class="option-term" id="option-cargo-build---target"><a class="option-anchor" href="#option-cargo-build---target"></a><code>--target</code> <em>triple</em></dt>
<dd class="option-desc">Build for the given architecture. The default is the host architecture. The general format of the triple is <dd class="option-desc">Build for the given architecture. The default is the host architecture. The general format of the triple is
<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>. Run <code>rustc --print target-list</code> for a <code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>. Run <code>rustc --print target-list</code> for a
list of supported targets.</p> list of supported targets. This flag may be specified multiple times.</p>
<p>This may also be specified with the <code>build.target</code> <p>This may also be specified with the <code>build.target</code>
<a href="../reference/config.html">config value</a>.</p> <a href="../reference/config.html">config value</a>.</p>
<p>Note that specifying this flag makes Cargo run in a different mode where the <p>Note that specifying this flag makes Cargo run in a different mode where the

View File

@ -1,6 +1,7 @@
# cargo-check(1) # cargo-check(1)
## NAME ## NAME
cargo-check - Check the current package cargo-check - Check the current package
@ -177,7 +178,7 @@ be specified multiple times, which enables all specified features.</dd>
<dt class="option-term" id="option-cargo-check---target"><a class="option-anchor" href="#option-cargo-check---target"></a><code>--target</code> <em>triple</em></dt> <dt class="option-term" id="option-cargo-check---target"><a class="option-anchor" href="#option-cargo-check---target"></a><code>--target</code> <em>triple</em></dt>
<dd class="option-desc">Check for the given architecture. The default is the host architecture. The general format of the triple is <dd class="option-desc">Check for the given architecture. The default is the host architecture. The general format of the triple is
<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>. Run <code>rustc --print target-list</code> for a <code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>. Run <code>rustc --print target-list</code> for a
list of supported targets.</p> list of supported targets. This flag may be specified multiple times.</p>
<p>This may also be specified with the <code>build.target</code> <p>This may also be specified with the <code>build.target</code>
<a href="../reference/config.html">config value</a>.</p> <a href="../reference/config.html">config value</a>.</p>
<p>Note that specifying this flag makes Cargo run in a different mode where the <p>Note that specifying this flag makes Cargo run in a different mode where the

View File

@ -1,6 +1,7 @@
# cargo-clean(1) # cargo-clean(1)
## NAME ## NAME
cargo-clean - Remove generated artifacts cargo-clean - Remove generated artifacts
@ -59,7 +60,7 @@ Defaults to <code>target</code> in the root of the workspace.</dd>
<dt class="option-term" id="option-cargo-clean---target"><a class="option-anchor" href="#option-cargo-clean---target"></a><code>--target</code> <em>triple</em></dt> <dt class="option-term" id="option-cargo-clean---target"><a class="option-anchor" href="#option-cargo-clean---target"></a><code>--target</code> <em>triple</em></dt>
<dd class="option-desc">Clean for the given architecture. The default is the host architecture. The general format of the triple is <dd class="option-desc">Clean for the given architecture. The default is the host architecture. The general format of the triple is
<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>. Run <code>rustc --print target-list</code> for a <code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>. Run <code>rustc --print target-list</code> for a
list of supported targets.</p> list of supported targets. This flag may be specified multiple times.</p>
<p>This may also be specified with the <code>build.target</code> <p>This may also be specified with the <code>build.target</code>
<a href="../reference/config.html">config value</a>.</p> <a href="../reference/config.html">config value</a>.</p>
<p>Note that specifying this flag makes Cargo run in a different mode where the <p>Note that specifying this flag makes Cargo run in a different mode where the

View File

@ -1,6 +1,7 @@
# cargo-doc(1) # cargo-doc(1)
## NAME ## NAME
cargo-doc - Build a package's documentation cargo-doc - Build a package's documentation
@ -155,7 +156,7 @@ be specified multiple times, which enables all specified features.</dd>
<dt class="option-term" id="option-cargo-doc---target"><a class="option-anchor" href="#option-cargo-doc---target"></a><code>--target</code> <em>triple</em></dt> <dt class="option-term" id="option-cargo-doc---target"><a class="option-anchor" href="#option-cargo-doc---target"></a><code>--target</code> <em>triple</em></dt>
<dd class="option-desc">Document for the given architecture. The default is the host architecture. The general format of the triple is <dd class="option-desc">Document for the given architecture. The default is the host architecture. The general format of the triple is
<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>. Run <code>rustc --print target-list</code> for a <code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>. Run <code>rustc --print target-list</code> for a
list of supported targets.</p> list of supported targets. This flag may be specified multiple times.</p>
<p>This may also be specified with the <code>build.target</code> <p>This may also be specified with the <code>build.target</code>
<a href="../reference/config.html">config value</a>.</p> <a href="../reference/config.html">config value</a>.</p>
<p>Note that specifying this flag makes Cargo run in a different mode where the <p>Note that specifying this flag makes Cargo run in a different mode where the

View File

@ -2,6 +2,7 @@
## NAME ## NAME
cargo-fetch - Fetch dependencies of a package from the network 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.
<dt class="option-term" id="option-cargo-fetch---target"><a class="option-anchor" href="#option-cargo-fetch---target"></a><code>--target</code> <em>triple</em></dt> <dt class="option-term" id="option-cargo-fetch---target"><a class="option-anchor" href="#option-cargo-fetch---target"></a><code>--target</code> <em>triple</em></dt>
<dd class="option-desc">Fetch for the given architecture. The default is all architectures. The general format of the triple is <dd class="option-desc">Fetch for the given architecture. The default is all architectures. The general format of the triple is
<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>. Run <code>rustc --print target-list</code> for a <code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>. Run <code>rustc --print target-list</code> for a
list of supported targets.</p> list of supported targets. This flag may be specified multiple times.</p>
<p>This may also be specified with the <code>build.target</code> <p>This may also be specified with the <code>build.target</code>
<a href="../reference/config.html">config value</a>.</p> <a href="../reference/config.html">config value</a>.</p>
<p>Note that specifying this flag makes Cargo run in a different mode where the <p>Note that specifying this flag makes Cargo run in a different mode where the

View File

@ -1,6 +1,7 @@
# cargo-fix(1) # cargo-fix(1)
## NAME ## NAME
cargo-fix - Automatically fix lint warnings reported by rustc cargo-fix - Automatically fix lint warnings reported by rustc
@ -257,7 +258,7 @@ be specified multiple times, which enables all specified features.</dd>
<dt class="option-term" id="option-cargo-fix---target"><a class="option-anchor" href="#option-cargo-fix---target"></a><code>--target</code> <em>triple</em></dt> <dt class="option-term" id="option-cargo-fix---target"><a class="option-anchor" href="#option-cargo-fix---target"></a><code>--target</code> <em>triple</em></dt>
<dd class="option-desc">Fix for the given architecture. The default is the host architecture. The general format of the triple is <dd class="option-desc">Fix for the given architecture. The default is the host architecture. The general format of the triple is
<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>. Run <code>rustc --print target-list</code> for a <code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>. Run <code>rustc --print target-list</code> for a
list of supported targets.</p> list of supported targets. This flag may be specified multiple times.</p>
<p>This may also be specified with the <code>build.target</code> <p>This may also be specified with the <code>build.target</code>
<a href="../reference/config.html">config value</a>.</p> <a href="../reference/config.html">config value</a>.</p>
<p>Note that specifying this flag makes Cargo run in a different mode where the <p>Note that specifying this flag makes Cargo run in a different mode where the

View File

@ -2,6 +2,7 @@
## NAME ## NAME
cargo-package - Assemble the local package into a distributable tarball cargo-package - Assemble the local package into a distributable tarball
@ -133,7 +134,7 @@ single quotes or double quotes around each pattern.</dd>
<dt class="option-term" id="option-cargo-package---target"><a class="option-anchor" href="#option-cargo-package---target"></a><code>--target</code> <em>triple</em></dt> <dt class="option-term" id="option-cargo-package---target"><a class="option-anchor" href="#option-cargo-package---target"></a><code>--target</code> <em>triple</em></dt>
<dd class="option-desc">Package for the given architecture. The default is the host architecture. The general format of the triple is <dd class="option-desc">Package for the given architecture. The default is the host architecture. The general format of the triple is
<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>. Run <code>rustc --print target-list</code> for a <code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>. Run <code>rustc --print target-list</code> for a
list of supported targets.</p> list of supported targets. This flag may be specified multiple times.</p>
<p>This may also be specified with the <code>build.target</code> <p>This may also be specified with the <code>build.target</code>
<a href="../reference/config.html">config value</a>.</p> <a href="../reference/config.html">config value</a>.</p>
<p>Note that specifying this flag makes Cargo run in a different mode where the <p>Note that specifying this flag makes Cargo run in a different mode where the

View File

@ -1,6 +1,7 @@
# cargo-publish(1) # cargo-publish(1)
## NAME ## NAME
cargo-publish - Upload a package to the registry cargo-publish - Upload a package to the registry
@ -99,7 +100,7 @@ format.</dd>
<dt class="option-term" id="option-cargo-publish---target"><a class="option-anchor" href="#option-cargo-publish---target"></a><code>--target</code> <em>triple</em></dt> <dt class="option-term" id="option-cargo-publish---target"><a class="option-anchor" href="#option-cargo-publish---target"></a><code>--target</code> <em>triple</em></dt>
<dd class="option-desc">Publish for the given architecture. The default is the host architecture. The general format of the triple is <dd class="option-desc">Publish for the given architecture. The default is the host architecture. The general format of the triple is
<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>. Run <code>rustc --print target-list</code> for a <code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>. Run <code>rustc --print target-list</code> for a
list of supported targets.</p> list of supported targets. This flag may be specified multiple times.</p>
<p>This may also be specified with the <code>build.target</code> <p>This may also be specified with the <code>build.target</code>
<a href="../reference/config.html">config value</a>.</p> <a href="../reference/config.html">config value</a>.</p>
<p>Note that specifying this flag makes Cargo run in a different mode where the <p>Note that specifying this flag makes Cargo run in a different mode where the

View File

@ -1,6 +1,7 @@
# cargo-rustc(1) # cargo-rustc(1)
## NAME ## NAME
cargo-rustc - Compile the current package, and pass extra options to the compiler 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.</dd>
<dt class="option-term" id="option-cargo-rustc---target"><a class="option-anchor" href="#option-cargo-rustc---target"></a><code>--target</code> <em>triple</em></dt> <dt class="option-term" id="option-cargo-rustc---target"><a class="option-anchor" href="#option-cargo-rustc---target"></a><code>--target</code> <em>triple</em></dt>
<dd class="option-desc">Build for the given architecture. The default is the host architecture. The general format of the triple is <dd class="option-desc">Build for the given architecture. The default is the host architecture. The general format of the triple is
<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>. Run <code>rustc --print target-list</code> for a <code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>. Run <code>rustc --print target-list</code> for a
list of supported targets.</p> list of supported targets. This flag may be specified multiple times.</p>
<p>This may also be specified with the <code>build.target</code> <p>This may also be specified with the <code>build.target</code>
<a href="../reference/config.html">config value</a>.</p> <a href="../reference/config.html">config value</a>.</p>
<p>Note that specifying this flag makes Cargo run in a different mode where the <p>Note that specifying this flag makes Cargo run in a different mode where the

View File

@ -1,6 +1,7 @@
# cargo-rustdoc(1) # cargo-rustdoc(1)
## NAME ## NAME
cargo-rustdoc - Build a package's documentation, using specified custom flags cargo-rustdoc - Build a package's documentation, using specified custom flags
@ -174,7 +175,7 @@ be specified multiple times, which enables all specified features.</dd>
<dt class="option-term" id="option-cargo-rustdoc---target"><a class="option-anchor" href="#option-cargo-rustdoc---target"></a><code>--target</code> <em>triple</em></dt> <dt class="option-term" id="option-cargo-rustdoc---target"><a class="option-anchor" href="#option-cargo-rustdoc---target"></a><code>--target</code> <em>triple</em></dt>
<dd class="option-desc">Document for the given architecture. The default is the host architecture. The general format of the triple is <dd class="option-desc">Document for the given architecture. The default is the host architecture. The general format of the triple is
<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>. Run <code>rustc --print target-list</code> for a <code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>. Run <code>rustc --print target-list</code> for a
list of supported targets.</p> list of supported targets. This flag may be specified multiple times.</p>
<p>This may also be specified with the <code>build.target</code> <p>This may also be specified with the <code>build.target</code>
<a href="../reference/config.html">config value</a>.</p> <a href="../reference/config.html">config value</a>.</p>
<p>Note that specifying this flag makes Cargo run in a different mode where the <p>Note that specifying this flag makes Cargo run in a different mode where the

View File

@ -2,6 +2,7 @@
## NAME ## NAME
cargo-test - Execute unit and integration tests of a package cargo-test - Execute unit and integration tests of a package
@ -269,7 +270,7 @@ be specified multiple times, which enables all specified features.</dd>
<dt class="option-term" id="option-cargo-test---target"><a class="option-anchor" href="#option-cargo-test---target"></a><code>--target</code> <em>triple</em></dt> <dt class="option-term" id="option-cargo-test---target"><a class="option-anchor" href="#option-cargo-test---target"></a><code>--target</code> <em>triple</em></dt>
<dd class="option-desc">Test for the given architecture. The default is the host architecture. The general format of the triple is <dd class="option-desc">Test for the given architecture. The default is the host architecture. The general format of the triple is
<code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>. Run <code>rustc --print target-list</code> for a <code>&lt;arch&gt;&lt;sub&gt;-&lt;vendor&gt;-&lt;sys&gt;-&lt;abi&gt;</code>. Run <code>rustc --print target-list</code> for a
list of supported targets.</p> list of supported targets. This flag may be specified multiple times.</p>
<p>This may also be specified with the <code>build.target</code> <p>This may also be specified with the <code>build.target</code>
<a href="../reference/config.html">config value</a>.</p> <a href="../reference/config.html">config value</a>.</p>
<p>Note that specifying this flag makes Cargo run in a different mode where the <p>Note that specifying this flag makes Cargo run in a different mode where the

View File

@ -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`. Sets the executable to use for `rustdoc`.
##### `build.target` ##### `build.target`
* Type: string * Type: string or array of strings
* Default: host platform * Default: host platform
* Environment: `CARGO_BUILD_TARGET` * 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. Can be overridden with the `--target` CLI option.
```toml
[build]
target = ["x86_64-unknown-linux-gnu", "i686-unknown-linux-gnu"]
```
##### `build.target-dir` ##### `build.target-dir`
* Type: string (path) * Type: string (path)
* Default: "target" * Default: "target"

View File

@ -48,7 +48,7 @@ how the feature works:
```toml ```toml
[unstable] [unstable]
mtime-on-use = true mtime-on-use = true
multitarget = true build-std = ["core", "alloc"]
``` ```
Each new feature described below should explain how to use it. 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 * 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. * [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. * [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](#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. * [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. * [binary-dep-depinfo](#binary-dep-depinfo) — Causes the dep-info file to track binary dependencies.
@ -218,32 +217,6 @@ information from `.cargo/config.toml`. See the rustc issue for more information.
cargo test --target foo -Zdoctest-xcompile 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 #### New `dir-name` attribute
Some of the paths generated under `target/` have resulted in a de-facto "build Some of the paths generated under `target/` have resulted in a de-facto "build
@ -1569,3 +1542,9 @@ unstable and require `-Zunstable-options`.)
The `--config` CLI option has been stabilized in the 1.63 release. See The `--config` CLI option has been stabilized in the 1.63 release. See
the [config documentation](config.html#command-line-overrides) for more the [config documentation](config.html#command-line-overrides) for more
information. 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.

View File

@ -257,7 +257,7 @@ Do not activate the \fBdefault\fR feature of the selected packages.
.RS 4 .RS 4
Benchmark for the given architecture. The default is the host architecture. The general format of the triple is Benchmark for the given architecture. The default is the host architecture. The general format of the triple is
\fB<arch><sub>\-<vendor>\-<sys>\-<abi>\fR\&. Run \fBrustc \-\-print target\-list\fR for a \fB<arch><sub>\-<vendor>\-<sys>\-<abi>\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 .sp
This may also be specified with the \fBbuild.target\fR This may also be specified with the \fBbuild.target\fR
\fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&. \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&.

View File

@ -168,7 +168,7 @@ Do not activate the \fBdefault\fR feature of the selected packages.
.RS 4 .RS 4
Build for the given architecture. The default is the host architecture. The general format of the triple is Build for the given architecture. The default is the host architecture. The general format of the triple is
\fB<arch><sub>\-<vendor>\-<sys>\-<abi>\fR\&. Run \fBrustc \-\-print target\-list\fR for a \fB<arch><sub>\-<vendor>\-<sys>\-<abi>\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 .sp
This may also be specified with the \fBbuild.target\fR This may also be specified with the \fBbuild.target\fR
\fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&. \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&.

View File

@ -164,7 +164,7 @@ Do not activate the \fBdefault\fR feature of the selected packages.
.RS 4 .RS 4
Check for the given architecture. The default is the host architecture. The general format of the triple is Check for the given architecture. The default is the host architecture. The general format of the triple is
\fB<arch><sub>\-<vendor>\-<sys>\-<abi>\fR\&. Run \fBrustc \-\-print target\-list\fR for a \fB<arch><sub>\-<vendor>\-<sys>\-<abi>\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 .sp
This may also be specified with the \fBbuild.target\fR This may also be specified with the \fBbuild.target\fR
\fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&. \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&.

View File

@ -53,7 +53,7 @@ Defaults to \fBtarget\fR in the root of the workspace.
.RS 4 .RS 4
Clean for the given architecture. The default is the host architecture. The general format of the triple is Clean for the given architecture. The default is the host architecture. The general format of the triple is
\fB<arch><sub>\-<vendor>\-<sys>\-<abi>\fR\&. Run \fBrustc \-\-print target\-list\fR for a \fB<arch><sub>\-<vendor>\-<sys>\-<abi>\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 .sp
This may also be specified with the \fBbuild.target\fR This may also be specified with the \fBbuild.target\fR
\fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&. \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&.

View File

@ -137,7 +137,7 @@ Do not activate the \fBdefault\fR feature of the selected packages.
.RS 4 .RS 4
Document for the given architecture. The default is the host architecture. The general format of the triple is Document for the given architecture. The default is the host architecture. The general format of the triple is
\fB<arch><sub>\-<vendor>\-<sys>\-<abi>\fR\&. Run \fBrustc \-\-print target\-list\fR for a \fB<arch><sub>\-<vendor>\-<sys>\-<abi>\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 .sp
This may also be specified with the \fBbuild.target\fR This may also be specified with the \fBbuild.target\fR
\fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&. \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&.

View File

@ -27,7 +27,7 @@ you plan to use Cargo without a network with the \fB\-\-offline\fR flag.
.RS 4 .RS 4
Fetch for the given architecture. The default is all architectures. The general format of the triple is Fetch for the given architecture. The default is all architectures. The general format of the triple is
\fB<arch><sub>\-<vendor>\-<sys>\-<abi>\fR\&. Run \fBrustc \-\-print target\-list\fR for a \fB<arch><sub>\-<vendor>\-<sys>\-<abi>\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 .sp
This may also be specified with the \fBbuild.target\fR This may also be specified with the \fBbuild.target\fR
\fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&. \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&.

View File

@ -259,7 +259,7 @@ Do not activate the \fBdefault\fR feature of the selected packages.
.RS 4 .RS 4
Fix for the given architecture. The default is the host architecture. The general format of the triple is Fix for the given architecture. The default is the host architecture. The general format of the triple is
\fB<arch><sub>\-<vendor>\-<sys>\-<abi>\fR\&. Run \fBrustc \-\-print target\-list\fR for a \fB<arch><sub>\-<vendor>\-<sys>\-<abi>\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 .sp
This may also be specified with the \fBbuild.target\fR This may also be specified with the \fBbuild.target\fR
\fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&. \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&.

View File

@ -148,7 +148,7 @@ single quotes or double quotes around each pattern.
.RS 4 .RS 4
Package for the given architecture. The default is the host architecture. The general format of the triple is Package for the given architecture. The default is the host architecture. The general format of the triple is
\fB<arch><sub>\-<vendor>\-<sys>\-<abi>\fR\&. Run \fBrustc \-\-print target\-list\fR for a \fB<arch><sub>\-<vendor>\-<sys>\-<abi>\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 .sp
This may also be specified with the \fBbuild.target\fR This may also be specified with the \fBbuild.target\fR
\fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&. \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&.

View File

@ -98,7 +98,7 @@ format.
.RS 4 .RS 4
Publish for the given architecture. The default is the host architecture. The general format of the triple is Publish for the given architecture. The default is the host architecture. The general format of the triple is
\fB<arch><sub>\-<vendor>\-<sys>\-<abi>\fR\&. Run \fBrustc \-\-print target\-list\fR for a \fB<arch><sub>\-<vendor>\-<sys>\-<abi>\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 .sp
This may also be specified with the \fBbuild.target\fR This may also be specified with the \fBbuild.target\fR
\fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&. \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&.

View File

@ -154,7 +154,7 @@ Do not activate the \fBdefault\fR feature of the selected packages.
.RS 4 .RS 4
Build for the given architecture. The default is the host architecture. The general format of the triple is Build for the given architecture. The default is the host architecture. The general format of the triple is
\fB<arch><sub>\-<vendor>\-<sys>\-<abi>\fR\&. Run \fBrustc \-\-print target\-list\fR for a \fB<arch><sub>\-<vendor>\-<sys>\-<abi>\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 .sp
This may also be specified with the \fBbuild.target\fR This may also be specified with the \fBbuild.target\fR
\fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&. \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&.

View File

@ -156,7 +156,7 @@ Do not activate the \fBdefault\fR feature of the selected packages.
.RS 4 .RS 4
Document for the given architecture. The default is the host architecture. The general format of the triple is Document for the given architecture. The default is the host architecture. The general format of the triple is
\fB<arch><sub>\-<vendor>\-<sys>\-<abi>\fR\&. Run \fBrustc \-\-print target\-list\fR for a \fB<arch><sub>\-<vendor>\-<sys>\-<abi>\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 .sp
This may also be specified with the \fBbuild.target\fR This may also be specified with the \fBbuild.target\fR
\fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&. \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&.

View File

@ -269,7 +269,7 @@ Do not activate the \fBdefault\fR feature of the selected packages.
.RS 4 .RS 4
Test for the given architecture. The default is the host architecture. The general format of the triple is Test for the given architecture. The default is the host architecture. The general format of the triple is
\fB<arch><sub>\-<vendor>\-<sys>\-<abi>\fR\&. Run \fBrustc \-\-print target\-list\fR for a \fB<arch><sub>\-<vendor>\-<sys>\-<abi>\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 .sp
This may also be specified with the \fBbuild.target\fR This may also be specified with the \fBbuild.target\fR
\fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&. \fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&.