Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/cargo/core/compiler/compile_kind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ impl CompileKind {
let deduplicated_targets = targets
.iter()
.map(|value| {
// This neatly substitutes the manually-specified `host` target directive
// This neatly substitutes the manually-specified `host-tuple` target directive
// with the compiling machine's target triple.

if value.as_str() == "host" {
if value.as_str() == "host-tuple" {
let host_triple = env!("RUST_HOST_TARGET");
Ok(CompileKind::Target(CompileTarget::new(host_triple)?))
} else {
Expand Down
10 changes: 6 additions & 4 deletions src/cargo/util/command_prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1260,10 +1260,12 @@ fn get_target_triples() -> Vec<clap_complete::CompletionCandidate> {
}
}

// Allow tab-completion for `host` as the desired target.
candidates.push(clap_complete::CompletionCandidate::new("host").help(Some(
concat!("alias for: ", env!("RUST_HOST_TARGET")).into(),
)));
// Allow tab-completion for `host-tuple` as the desired target.
candidates.push(
clap_complete::CompletionCandidate::new("host-tuple").help(Some(
concat!("alias for: ", env!("RUST_HOST_TARGET")).into(),
)),
);

candidates
}
Expand Down
4 changes: 2 additions & 2 deletions src/doc/man/generated_txt/cargo-bench.txt
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ OPTIONS

o Any supported target in rustc --print target-list.

o "host", which will internally be substituted by the host’s
target. This can be particularly useful if you’re
o "host-tuple", which will internally be substituted by the
host’s target. This can be particularly useful if you’re
cross-compiling some crates, and don’t want to specify your
host’s machine as a target (for instance, an xtask in a shared
project that may be worked on by many hosts).
Expand Down
4 changes: 2 additions & 2 deletions src/doc/man/generated_txt/cargo-build.txt
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ OPTIONS

o Any supported target in rustc --print target-list.

o "host", which will internally be substituted by the host’s
target. This can be particularly useful if you’re
o "host-tuple", which will internally be substituted by the
host’s target. This can be particularly useful if you’re
cross-compiling some crates, and don’t want to specify your
host’s machine as a target (for instance, an xtask in a shared
project that may be worked on by many hosts).
Expand Down
4 changes: 2 additions & 2 deletions src/doc/man/generated_txt/cargo-check.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ OPTIONS

o Any supported target in rustc --print target-list.

o "host", which will internally be substituted by the host’s
target. This can be particularly useful if you’re
o "host-tuple", which will internally be substituted by the
host’s target. This can be particularly useful if you’re
cross-compiling some crates, and don’t want to specify your
host’s machine as a target (for instance, an xtask in a shared
project that may be worked on by many hosts).
Expand Down
4 changes: 2 additions & 2 deletions src/doc/man/generated_txt/cargo-clean.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ OPTIONS

o Any supported target in rustc --print target-list.

o "host", which will internally be substituted by the host’s
target. This can be particularly useful if you’re
o "host-tuple", which will internally be substituted by the
host’s target. This can be particularly useful if you’re
cross-compiling some crates, and don’t want to specify your
host’s machine as a target (for instance, an xtask in a shared
project that may be worked on by many hosts).
Expand Down
4 changes: 2 additions & 2 deletions src/doc/man/generated_txt/cargo-doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ OPTIONS

o Any supported target in rustc --print target-list.

o "host", which will internally be substituted by the host’s
target. This can be particularly useful if you’re
o "host-tuple", which will internally be substituted by the
host’s target. This can be particularly useful if you’re
cross-compiling some crates, and don’t want to specify your
host’s machine as a target (for instance, an xtask in a shared
project that may be worked on by many hosts).
Expand Down
4 changes: 2 additions & 2 deletions src/doc/man/generated_txt/cargo-fetch.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ OPTIONS

o Any supported target in rustc --print target-list.

o "host", which will internally be substituted by the host’s
target. This can be particularly useful if you’re
o "host-tuple", which will internally be substituted by the
host’s target. This can be particularly useful if you’re
cross-compiling some crates, and don’t want to specify your
host’s machine as a target (for instance, an xtask in a shared
project that may be worked on by many hosts).
Expand Down
4 changes: 2 additions & 2 deletions src/doc/man/generated_txt/cargo-fix.txt
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ OPTIONS

o Any supported target in rustc --print target-list.

o "host", which will internally be substituted by the host’s
target. This can be particularly useful if you’re
o "host-tuple", which will internally be substituted by the
host’s target. This can be particularly useful if you’re
cross-compiling some crates, and don’t want to specify your
host’s machine as a target (for instance, an xtask in a shared
project that may be worked on by many hosts).
Expand Down
4 changes: 2 additions & 2 deletions src/doc/man/generated_txt/cargo-install.txt
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ OPTIONS

o Any supported target in rustc --print target-list.

o "host", which will internally be substituted by the host’s
target. This can be particularly useful if you’re
o "host-tuple", which will internally be substituted by the
host’s target. This can be particularly useful if you’re
cross-compiling some crates, and don’t want to specify your
host’s machine as a target (for instance, an xtask in a shared
project that may be worked on by many hosts).
Expand Down
4 changes: 2 additions & 2 deletions src/doc/man/generated_txt/cargo-package.txt
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ OPTIONS

o Any supported target in rustc --print target-list.

o "host", which will internally be substituted by the host’s
target. This can be particularly useful if you’re
o "host-tuple", which will internally be substituted by the
host’s target. This can be particularly useful if you’re
cross-compiling some crates, and don’t want to specify your
host’s machine as a target (for instance, an xtask in a shared
project that may be worked on by many hosts).
Expand Down
4 changes: 2 additions & 2 deletions src/doc/man/generated_txt/cargo-publish.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ OPTIONS

o Any supported target in rustc --print target-list.

o "host", which will internally be substituted by the host’s
target. This can be particularly useful if you’re
o "host-tuple", which will internally be substituted by the
host’s target. This can be particularly useful if you’re
cross-compiling some crates, and don’t want to specify your
host’s machine as a target (for instance, an xtask in a shared
project that may be worked on by many hosts).
Expand Down
4 changes: 2 additions & 2 deletions src/doc/man/generated_txt/cargo-run.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ OPTIONS

o Any supported target in rustc --print target-list.

o "host", which will internally be substituted by the host’s
target. This can be particularly useful if you’re
o "host-tuple", which will internally be substituted by the
host’s target. This can be particularly useful if you’re
cross-compiling some crates, and don’t want to specify your
host’s machine as a target (for instance, an xtask in a shared
project that may be worked on by many hosts).
Expand Down
4 changes: 2 additions & 2 deletions src/doc/man/generated_txt/cargo-rustc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ OPTIONS

o Any supported target in rustc --print target-list.

o "host", which will internally be substituted by the host’s
target. This can be particularly useful if you’re
o "host-tuple", which will internally be substituted by the
host’s target. This can be particularly useful if you’re
cross-compiling some crates, and don’t want to specify your
host’s machine as a target (for instance, an xtask in a shared
project that may be worked on by many hosts).
Expand Down
4 changes: 2 additions & 2 deletions src/doc/man/generated_txt/cargo-rustdoc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ OPTIONS

o Any supported target in rustc --print target-list.

o "host", which will internally be substituted by the host’s
target. This can be particularly useful if you’re
o "host-tuple", which will internally be substituted by the
host’s target. This can be particularly useful if you’re
cross-compiling some crates, and don’t want to specify your
host’s machine as a target (for instance, an xtask in a shared
project that may be worked on by many hosts).
Expand Down
4 changes: 2 additions & 2 deletions src/doc/man/generated_txt/cargo-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ OPTIONS

o Any supported target in rustc --print target-list.

o "host", which will internally be substituted by the host’s
target. This can be particularly useful if you’re
o "host-tuple", which will internally be substituted by the
host’s target. This can be particularly useful if you’re
cross-compiling some crates, and don’t want to specify your
host’s machine as a target (for instance, an xtask in a shared
project that may be worked on by many hosts).
Expand Down
2 changes: 1 addition & 1 deletion src/doc/man/includes/options-target-triple.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

Possible values:
- Any supported target in `rustc --print target-list`.
- `"host"`, which will internally be substituted by the host's target. This can be particularly useful if you're cross-compiling some crates, and don't want to specify your host's machine as a target (for instance, an `xtask` in a shared project that may be worked on by many hosts).
- `"host-tuple"`, which will internally be substituted by the host's target. This can be particularly useful if you're cross-compiling some crates, and don't want to specify your host's machine as a target (for instance, an `xtask` in a shared project that may be worked on by many hosts).
- A path to a custom target specification. See [Custom Target Lookup Path](../../rustc/targets/custom.html#custom-target-lookup-path) for more information.


Expand Down
2 changes: 1 addition & 1 deletion src/doc/src/commands/cargo-bench.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ be specified multiple times, which enables all specified features.</dd>
<p>Possible values:</p>
<ul>
<li>Any supported target in <code>rustc --print target-list</code>.</li>
<li><code>"host"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>
<li><code>"host-tuple"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>
<li>A path to a custom target specification. See <a href="../../rustc/targets/custom.html#custom-target-lookup-path">Custom Target Lookup Path</a> for more information.</li>
</ul>
<p>This may also be specified with the <code>build.target</code> <a href="../reference/config.html">config value</a>.</p>
Expand Down
2 changes: 1 addition & 1 deletion src/doc/src/commands/cargo-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ be specified multiple times, which enables all specified features.</dd>
<p>Possible values:</p>
<ul>
<li>Any supported target in <code>rustc --print target-list</code>.</li>
<li><code>"host"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>
<li><code>"host-tuple"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>
<li>A path to a custom target specification. See <a href="../../rustc/targets/custom.html#custom-target-lookup-path">Custom Target Lookup Path</a> for more information.</li>
</ul>
<p>This may also be specified with the <code>build.target</code> <a href="../reference/config.html">config value</a>.</p>
Expand Down
2 changes: 1 addition & 1 deletion src/doc/src/commands/cargo-check.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ be specified multiple times, which enables all specified features.</dd>
<p>Possible values:</p>
<ul>
<li>Any supported target in <code>rustc --print target-list</code>.</li>
<li><code>"host"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>
<li><code>"host-tuple"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>
<li>A path to a custom target specification. See <a href="../../rustc/targets/custom.html#custom-target-lookup-path">Custom Target Lookup Path</a> for more information.</li>
</ul>
<p>This may also be specified with the <code>build.target</code> <a href="../reference/config.html">config value</a>.</p>
Expand Down
2 changes: 1 addition & 1 deletion src/doc/src/commands/cargo-clean.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Defaults to <code>target</code> in the root of the workspace.</dd>
<p>Possible values:</p>
<ul>
<li>Any supported target in <code>rustc --print target-list</code>.</li>
<li><code>"host"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>
<li><code>"host-tuple"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>
<li>A path to a custom target specification. See <a href="../../rustc/targets/custom.html#custom-target-lookup-path">Custom Target Lookup Path</a> for more information.</li>
</ul>
<p>This may also be specified with the <code>build.target</code> <a href="../reference/config.html">config value</a>.</p>
Expand Down
2 changes: 1 addition & 1 deletion src/doc/src/commands/cargo-doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ be specified multiple times, which enables all specified features.</dd>
<p>Possible values:</p>
<ul>
<li>Any supported target in <code>rustc --print target-list</code>.</li>
<li><code>"host"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>
<li><code>"host-tuple"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>
<li>A path to a custom target specification. See <a href="../../rustc/targets/custom.html#custom-target-lookup-path">Custom Target Lookup Path</a> for more information.</li>
</ul>
<p>This may also be specified with the <code>build.target</code> <a href="../reference/config.html">config value</a>.</p>
Expand Down
2 changes: 1 addition & 1 deletion src/doc/src/commands/cargo-fetch.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ you plan to use Cargo without a network with the `--offline` flag.
<p>Possible values:</p>
<ul>
<li>Any supported target in <code>rustc --print target-list</code>.</li>
<li><code>"host"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>
<li><code>"host-tuple"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>
<li>A path to a custom target specification. See <a href="../../rustc/targets/custom.html#custom-target-lookup-path">Custom Target Lookup Path</a> for more information.</li>
</ul>
<p>This may also be specified with the <code>build.target</code> <a href="../reference/config.html">config value</a>.</p>
Expand Down
2 changes: 1 addition & 1 deletion src/doc/src/commands/cargo-fix.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ be specified multiple times, which enables all specified features.</dd>
<p>Possible values:</p>
<ul>
<li>Any supported target in <code>rustc --print target-list</code>.</li>
<li><code>"host"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>
<li><code>"host-tuple"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>
<li>A path to a custom target specification. See <a href="../../rustc/targets/custom.html#custom-target-lookup-path">Custom Target Lookup Path</a> for more information.</li>
</ul>
<p>This may also be specified with the <code>build.target</code> <a href="../reference/config.html">config value</a>.</p>
Expand Down
2 changes: 1 addition & 1 deletion src/doc/src/commands/cargo-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ be specified multiple times, which enables all specified features.</dd>
<p>Possible values:</p>
<ul>
<li>Any supported target in <code>rustc --print target-list</code>.</li>
<li><code>"host"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>
<li><code>"host-tuple"</code>, which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an <code>xtask</code> in a shared project that may be worked on by many hosts).</li>
<li>A path to a custom target specification. See <a href="../../rustc/targets/custom.html#custom-target-lookup-path">Custom Target Lookup Path</a> for more information.</li>
</ul>
<p>This may also be specified with the <code>build.target</code> <a href="../reference/config.html">config value</a>.</p>
Expand Down
Loading