Skip to content

Commit cde8c48

Browse files
committedJul 15, 2024
Auto merge of #127265 - harmou01:dev/harmou01/target-spec-metadata, r=Nilstrieb
Fill out target-spec metadata for all targets **What does this PR try to resolve?** This PR completes the target-spec metadata fields for all targets. This is required for a corresponding Cargo PR which adds a check for whether a target supports building the standard library when the `-Zbuild-std=std` flag is passed ([see this issue](rust-lang/wg-cargo-std-aware#87). This functionality in Cargo is reliant on the output of `--print=target-spec-json`. **How should we test and review this PR?** Check that a given target-spec metadata has been updated with: ``` $ ./x.py build library/std $ build/host/stage1/bin/rustc --print=target-spec-json --target <target_name> -Zunstable-options ``` **Additional Information** A few things to note: * Where a targets 'std' or 'host tools' support is listed as '?' in the rust docs, these are left as 'None' with this PR. The corresponding changes in cargo will only reject an attempt to build std if the 'std' field is 'Some(false)'. In the case it is 'None', cargo will continue trying to build * There's no rush for this to be merged. I understand that the format for this is not finalised yet. * Related: #120745
2 parents 8b72d7a + 3b14526 commit cde8c48

File tree

228 files changed

+903
-887
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

228 files changed

+903
-887
lines changed
 

‎compiler/rustc_target/src/spec/targets/aarch64_apple_darwin.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ pub fn target() -> Target {
1616
// correctly, we do too.
1717
llvm_target: macos_llvm_target(arch).into(),
1818
metadata: crate::spec::TargetMetadata {
19-
description: None,
20-
tier: None,
21-
host_tools: None,
22-
std: None,
19+
description: Some("ARM64 macOS (11.0+, Big Sur+)".into()),
20+
tier: Some(2),
21+
host_tools: Some(true),
22+
std: Some(true),
2323
},
2424
pointer_width: 64,
2525
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128-Fn32".into(),

‎compiler/rustc_target/src/spec/targets/aarch64_apple_ios.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ pub fn target() -> Target {
1313
// MACH-O commands, so we do too.
1414
llvm_target: ios_llvm_target(arch).into(),
1515
metadata: crate::spec::TargetMetadata {
16-
description: None,
17-
tier: None,
18-
host_tools: None,
19-
std: None,
16+
description: Some("ARM64 iOS".into()),
17+
tier: Some(2),
18+
host_tools: Some(false),
19+
std: Some(true),
2020
},
2121
pointer_width: 64,
2222
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128-Fn32".into(),

0 commit comments

Comments
 (0)