Skip to content

Commit cde8c48

Browse files
committed
Auto merge of rust-lang#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: rust-lang#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

+4-4
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

+4-4
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(),

compiler/rustc_target/src/spec/targets/aarch64_apple_ios_macabi.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ pub fn target() -> Target {
99
Target {
1010
llvm_target: mac_catalyst_llvm_target(arch).into(),
1111
metadata: crate::spec::TargetMetadata {
12-
description: None,
13-
tier: None,
14-
host_tools: None,
15-
std: None,
12+
description: Some("Apple Catalyst on ARM64".into()),
13+
tier: Some(3),
14+
host_tools: Some(false),
15+
std: Some(true),
1616
},
1717
pointer_width: 64,
1818
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128-Fn32".into(),

compiler/rustc_target/src/spec/targets/aarch64_apple_ios_sim.rs

+4-4
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_sim_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("Apple iOS Simulator on ARM64".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(),

compiler/rustc_target/src/spec/targets/aarch64_apple_tvos.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ pub fn target() -> Target {
66
Target {
77
llvm_target: tvos_llvm_target(arch).into(),
88
metadata: crate::spec::TargetMetadata {
9-
description: None,
10-
tier: None,
11-
host_tools: None,
12-
std: None,
9+
description: Some("ARM64 tvOS".into()),
10+
tier: Some(3),
11+
host_tools: Some(false),
12+
std: Some(true),
1313
},
1414
pointer_width: 64,
1515
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128-Fn32".into(),

compiler/rustc_target/src/spec/targets/aarch64_apple_tvos_sim.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ pub fn target() -> Target {
66
Target {
77
llvm_target: tvos_sim_llvm_target(arch).into(),
88
metadata: crate::spec::TargetMetadata {
9-
description: None,
10-
tier: None,
11-
host_tools: None,
12-
std: None,
9+
description: Some("ARM64 tvOS Simulator".into()),
10+
tier: Some(3),
11+
host_tools: Some(false),
12+
std: Some(true),
1313
},
1414
pointer_width: 64,
1515
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128-Fn32".into(),

compiler/rustc_target/src/spec/targets/aarch64_apple_watchos.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ pub fn target() -> Target {
66
Target {
77
llvm_target: "aarch64-apple-watchos".into(),
88
metadata: crate::spec::TargetMetadata {
9-
description: None,
10-
tier: None,
11-
host_tools: None,
12-
std: None,
9+
description: Some("ARM64 Apple WatchOS".into()),
10+
tier: Some(3),
11+
host_tools: Some(false),
12+
std: Some(true),
1313
},
1414
pointer_width: 64,
1515
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128-Fn32".into(),

compiler/rustc_target/src/spec/targets/aarch64_apple_watchos_sim.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ pub fn target() -> Target {
1010
// MACH-O commands, so we do too.
1111
llvm_target: watchos_sim_llvm_target(arch).into(),
1212
metadata: crate::spec::TargetMetadata {
13-
description: None,
14-
tier: None,
15-
host_tools: None,
16-
std: None,
13+
description: Some("ARM64 Apple WatchOS Simulator".into()),
14+
tier: Some(3),
15+
host_tools: Some(false),
16+
std: Some(true),
1717
},
1818
pointer_width: 64,
1919
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128-Fn32".into(),

compiler/rustc_target/src/spec/targets/aarch64_be_unknown_linux_gnu.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ pub fn target() -> Target {
55
Target {
66
llvm_target: "aarch64_be-unknown-linux-gnu".into(),
77
metadata: crate::spec::TargetMetadata {
8-
description: None,
9-
tier: None,
10-
host_tools: None,
11-
std: None,
8+
description: Some("ARM64 Linux (big-endian)".into()),
9+
tier: Some(3),
10+
host_tools: Some(true),
11+
std: Some(true),
1212
},
1313
pointer_width: 64,
1414
data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),

compiler/rustc_target/src/spec/targets/aarch64_be_unknown_linux_gnu_ilp32.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ pub fn target() -> Target {
88
Target {
99
llvm_target: "aarch64_be-unknown-linux-gnu_ilp32".into(),
1010
metadata: crate::spec::TargetMetadata {
11-
description: None,
12-
tier: None,
13-
host_tools: None,
14-
std: None,
11+
description: Some("ARM64 Linux (big-endian, ILP32 ABI)".into()),
12+
tier: Some(3),
13+
host_tools: Some(true),
14+
std: Some(true),
1515
},
1616
pointer_width: 32,
1717
data_layout: "E-m:e-p:32:32-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),

compiler/rustc_target/src/spec/targets/aarch64_be_unknown_netbsd.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ pub fn target() -> Target {
55
Target {
66
llvm_target: "aarch64_be-unknown-netbsd".into(),
77
metadata: crate::spec::TargetMetadata {
8-
description: None,
9-
tier: None,
10-
host_tools: None,
11-
std: None,
8+
description: Some("ARM64 NetBSD (big-endian)".into()),
9+
tier: Some(3),
10+
host_tools: Some(true),
11+
std: Some(true),
1212
},
1313
pointer_width: 64,
1414
data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),

compiler/rustc_target/src/spec/targets/aarch64_kmc_solid_asp3.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ pub fn target() -> Target {
55
Target {
66
llvm_target: "aarch64-unknown-none".into(),
77
metadata: crate::spec::TargetMetadata {
8-
description: None,
9-
tier: None,
10-
host_tools: None,
11-
std: None,
8+
description: Some("ARM64 SOLID with TOPPERS/ASP3".into()),
9+
tier: Some(3),
10+
host_tools: Some(false),
11+
std: Some(true),
1212
},
1313
pointer_width: 64,
1414
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),

compiler/rustc_target/src/spec/targets/aarch64_linux_android.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ pub fn target() -> Target {
77
Target {
88
llvm_target: "aarch64-linux-android".into(),
99
metadata: crate::spec::TargetMetadata {
10-
description: None,
11-
tier: None,
12-
host_tools: None,
13-
std: None,
10+
description: Some("ARM64 Android".into()),
11+
tier: Some(2),
12+
host_tools: Some(false),
13+
std: Some(true),
1414
},
1515
pointer_width: 64,
1616
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),

compiler/rustc_target/src/spec/targets/aarch64_nintendo_switch_freestanding.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ pub fn target() -> Target {
99
Target {
1010
llvm_target: "aarch64-unknown-none".into(),
1111
metadata: crate::spec::TargetMetadata {
12-
description: None,
13-
tier: None,
14-
host_tools: None,
15-
std: None,
12+
description: Some("ARM64 Nintendo Switch, Horizon".into()),
13+
tier: Some(3),
14+
host_tools: Some(false),
15+
std: Some(false),
1616
},
1717
pointer_width: 64,
1818
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),

compiler/rustc_target/src/spec/targets/aarch64_pc_windows_gnullvm.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ pub fn target() -> Target {
99
Target {
1010
llvm_target: "aarch64-pc-windows-gnu".into(),
1111
metadata: crate::spec::TargetMetadata {
12-
description: None,
13-
tier: None,
14-
host_tools: None,
15-
std: None,
12+
description: Some("ARM64 MinGW (Windows 10+), LLVM ABI".into()),
13+
tier: Some(2),
14+
host_tools: Some(false),
15+
std: Some(true),
1616
},
1717
pointer_width: 64,
1818
data_layout: "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128-Fn32".into(),

compiler/rustc_target/src/spec/targets/aarch64_pc_windows_msvc.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ pub fn target() -> Target {
88
Target {
99
llvm_target: "aarch64-pc-windows-msvc".into(),
1010
metadata: crate::spec::TargetMetadata {
11-
description: None,
12-
tier: None,
13-
host_tools: None,
14-
std: None,
11+
description: Some("ARM64 Windows MSVC".into()),
12+
tier: Some(2),
13+
host_tools: Some(true),
14+
std: Some(true),
1515
},
1616
pointer_width: 64,
1717
data_layout: "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128-Fn32".into(),

compiler/rustc_target/src/spec/targets/aarch64_unknown_freebsd.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ pub fn target() -> Target {
44
Target {
55
llvm_target: "aarch64-unknown-freebsd".into(),
66
metadata: crate::spec::TargetMetadata {
7-
description: None,
8-
tier: None,
9-
host_tools: None,
10-
std: None,
7+
description: Some("ARM64 FreeBSD".into()),
8+
tier: Some(3),
9+
host_tools: Some(true),
10+
std: Some(true),
1111
},
1212
pointer_width: 64,
1313
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),

compiler/rustc_target/src/spec/targets/aarch64_unknown_fuchsia.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ pub fn target() -> Target {
44
Target {
55
llvm_target: "aarch64-unknown-fuchsia".into(),
66
metadata: crate::spec::TargetMetadata {
7-
description: None,
8-
tier: None,
9-
host_tools: None,
10-
std: None,
7+
description: Some("ARM64 Fuchsia".into()),
8+
tier: Some(2),
9+
host_tools: Some(false),
10+
std: Some(true),
1111
},
1212
pointer_width: 64,
1313
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),

compiler/rustc_target/src/spec/targets/aarch64_unknown_hermit.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ pub fn target() -> Target {
44
Target {
55
llvm_target: "aarch64-unknown-hermit".into(),
66
metadata: crate::spec::TargetMetadata {
7-
description: None,
8-
tier: None,
9-
host_tools: None,
10-
std: None,
7+
description: Some("ARM64 Hermit".into()),
8+
tier: Some(3),
9+
host_tools: Some(false),
10+
std: Some(true),
1111
},
1212
pointer_width: 64,
1313
arch: "aarch64".into(),

compiler/rustc_target/src/spec/targets/aarch64_unknown_illumos.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ pub fn target() -> Target {
1212
// so we still pass Solaris to it
1313
llvm_target: "aarch64-unknown-solaris2.11".into(),
1414
metadata: crate::spec::TargetMetadata {
15-
description: None,
16-
tier: None,
17-
host_tools: None,
18-
std: None,
15+
description: Some("ARM64 illumos".into()),
16+
tier: Some(3),
17+
host_tools: Some(true),
18+
std: Some(true),
1919
},
2020
pointer_width: 64,
2121
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),

compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_gnu.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ pub fn target() -> Target {
44
Target {
55
llvm_target: "aarch64-unknown-linux-gnu".into(),
66
metadata: crate::spec::TargetMetadata {
7-
description: None,
8-
tier: None,
9-
host_tools: None,
10-
std: None,
7+
description: Some("ARM64 Linux (kernel 4.1, glibc 2.17+)".into()),
8+
tier: Some(1),
9+
host_tools: Some(true),
10+
std: Some(true),
1111
},
1212
pointer_width: 64,
1313
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),

compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_gnu_ilp32.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ pub fn target() -> Target {
44
Target {
55
llvm_target: "aarch64-unknown-linux-gnu_ilp32".into(),
66
metadata: crate::spec::TargetMetadata {
7-
description: None,
8-
tier: None,
9-
host_tools: None,
10-
std: None,
7+
description: Some("ARM64 Linux (ILP32 ABI)".into()),
8+
tier: Some(3),
9+
host_tools: Some(true),
10+
std: Some(true),
1111
},
1212
pointer_width: 32,
1313
data_layout: "e-m:e-p:32:32-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),

compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_musl.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ pub fn target() -> Target {
1515
Target {
1616
llvm_target: "aarch64-unknown-linux-musl".into(),
1717
metadata: crate::spec::TargetMetadata {
18-
description: None,
19-
tier: None,
20-
host_tools: None,
21-
std: None,
18+
description: Some("ARM64 Linux with musl 1.2.3".into()),
19+
tier: Some(2),
20+
host_tools: Some(true),
21+
std: Some(true),
2222
},
2323
pointer_width: 64,
2424
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),

compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_ohos.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ pub fn target() -> Target {
99
// LLVM 15 doesn't support OpenHarmony yet, use a linux target instead.
1010
llvm_target: "aarch64-unknown-linux-musl".into(),
1111
metadata: crate::spec::TargetMetadata {
12-
description: None,
13-
tier: None,
14-
host_tools: None,
15-
std: None,
12+
description: Some("ARM64 OpenHarmony".into()),
13+
tier: Some(2),
14+
host_tools: Some(false),
15+
std: Some(true),
1616
},
1717
pointer_width: 64,
1818
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),

compiler/rustc_target/src/spec/targets/aarch64_unknown_netbsd.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ pub fn target() -> Target {
44
Target {
55
llvm_target: "aarch64-unknown-netbsd".into(),
66
metadata: crate::spec::TargetMetadata {
7-
description: None,
8-
tier: None,
9-
host_tools: None,
10-
std: None,
7+
description: Some("ARM64 NetBSD".into()),
8+
tier: Some(3),
9+
host_tools: Some(true),
10+
std: Some(true),
1111
},
1212
pointer_width: 64,
1313
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),

compiler/rustc_target/src/spec/targets/aarch64_unknown_none.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ pub fn target() -> Target {
3232
Target {
3333
llvm_target: "aarch64-unknown-none".into(),
3434
metadata: crate::spec::TargetMetadata {
35-
description: None,
36-
tier: None,
37-
host_tools: None,
38-
std: None,
35+
description: Some("Bare ARM64, hardfloat".into()),
36+
tier: Some(2),
37+
host_tools: Some(false),
38+
std: Some(false),
3939
},
4040
pointer_width: 64,
4141
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),

0 commit comments

Comments
 (0)