Skip to content

Commit

Permalink
Auto merge of rust-lang#127265 - harmou01:dev/harmou01/target-spec-me…
Browse files Browse the repository at this point in the history
…tadata, 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
  • Loading branch information
bors committed Jul 15, 2024
2 parents 0da95bd + 3b14526 commit adeb79d
Show file tree
Hide file tree
Showing 228 changed files with 903 additions and 887 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ pub fn target() -> Target {
// correctly, we do too.
llvm_target: macos_llvm_target(arch).into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
host_tools: None,
std: None,
description: Some("ARM64 macOS (11.0+, Big Sur+)".into()),
tier: Some(2),
host_tools: Some(true),
std: Some(true),
},
pointer_width: 64,
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128-Fn32".into(),
Expand Down
8 changes: 4 additions & 4 deletions compiler/rustc_target/src/spec/targets/aarch64_apple_ios.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ pub fn target() -> Target {
// MACH-O commands, so we do too.
llvm_target: ios_llvm_target(arch).into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
host_tools: None,
std: None,
description: Some("ARM64 iOS".into()),
tier: Some(2),
host_tools: Some(false),
std: Some(true),
},
pointer_width: 64,
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128-Fn32".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ pub fn target() -> Target {
Target {
llvm_target: mac_catalyst_llvm_target(arch).into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
host_tools: None,
std: None,
description: Some("Apple Catalyst on ARM64".into()),
tier: Some(3),
host_tools: Some(false),
std: Some(true),
},
pointer_width: 64,
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128-Fn32".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ pub fn target() -> Target {
// MACH-O commands, so we do too.
llvm_target: ios_sim_llvm_target(arch).into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
host_tools: None,
std: None,
description: Some("Apple iOS Simulator on ARM64".into()),
tier: Some(2),
host_tools: Some(false),
std: Some(true),
},
pointer_width: 64,
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128-Fn32".into(),
Expand Down
8 changes: 4 additions & 4 deletions compiler/rustc_target/src/spec/targets/aarch64_apple_tvos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ pub fn target() -> Target {
Target {
llvm_target: tvos_llvm_target(arch).into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
host_tools: None,
std: None,
description: Some("ARM64 tvOS".into()),
tier: Some(3),
host_tools: Some(false),
std: Some(true),
},
pointer_width: 64,
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128-Fn32".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ pub fn target() -> Target {
Target {
llvm_target: tvos_sim_llvm_target(arch).into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
host_tools: None,
std: None,
description: Some("ARM64 tvOS Simulator".into()),
tier: Some(3),
host_tools: Some(false),
std: Some(true),
},
pointer_width: 64,
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128-Fn32".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ pub fn target() -> Target {
Target {
llvm_target: "aarch64-apple-watchos".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
host_tools: None,
std: None,
description: Some("ARM64 Apple WatchOS".into()),
tier: Some(3),
host_tools: Some(false),
std: Some(true),
},
pointer_width: 64,
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128-Fn32".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ pub fn target() -> Target {
// MACH-O commands, so we do too.
llvm_target: watchos_sim_llvm_target(arch).into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
host_tools: None,
std: None,
description: Some("ARM64 Apple WatchOS Simulator".into()),
tier: Some(3),
host_tools: Some(false),
std: Some(true),
},
pointer_width: 64,
data_layout: "e-m:o-i64:64-i128:128-n32:64-S128-Fn32".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ pub fn target() -> Target {
Target {
llvm_target: "aarch64_be-unknown-linux-gnu".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
host_tools: None,
std: None,
description: Some("ARM64 Linux (big-endian)".into()),
tier: Some(3),
host_tools: Some(true),
std: Some(true),
},
pointer_width: 64,
data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ pub fn target() -> Target {
Target {
llvm_target: "aarch64_be-unknown-linux-gnu_ilp32".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
host_tools: None,
std: None,
description: Some("ARM64 Linux (big-endian, ILP32 ABI)".into()),
tier: Some(3),
host_tools: Some(true),
std: Some(true),
},
pointer_width: 32,
data_layout: "E-m:e-p:32:32-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ pub fn target() -> Target {
Target {
llvm_target: "aarch64_be-unknown-netbsd".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
host_tools: None,
std: None,
description: Some("ARM64 NetBSD (big-endian)".into()),
tier: Some(3),
host_tools: Some(true),
std: Some(true),
},
pointer_width: 64,
data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ pub fn target() -> Target {
Target {
llvm_target: "aarch64-unknown-none".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
host_tools: None,
std: None,
description: Some("ARM64 SOLID with TOPPERS/ASP3".into()),
tier: Some(3),
host_tools: Some(false),
std: Some(true),
},
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ pub fn target() -> Target {
Target {
llvm_target: "aarch64-linux-android".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
host_tools: None,
std: None,
description: Some("ARM64 Android".into()),
tier: Some(2),
host_tools: Some(false),
std: Some(true),
},
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ pub fn target() -> Target {
Target {
llvm_target: "aarch64-unknown-none".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
host_tools: None,
std: None,
description: Some("ARM64 Nintendo Switch, Horizon".into()),
tier: Some(3),
host_tools: Some(false),
std: Some(false),
},
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ pub fn target() -> Target {
Target {
llvm_target: "aarch64-pc-windows-gnu".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
host_tools: None,
std: None,
description: Some("ARM64 MinGW (Windows 10+), LLVM ABI".into()),
tier: Some(2),
host_tools: Some(false),
std: Some(true),
},
pointer_width: 64,
data_layout: "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128-Fn32".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ pub fn target() -> Target {
Target {
llvm_target: "aarch64-pc-windows-msvc".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
host_tools: None,
std: None,
description: Some("ARM64 Windows MSVC".into()),
tier: Some(2),
host_tools: Some(true),
std: Some(true),
},
pointer_width: 64,
data_layout: "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128-Fn32".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ pub fn target() -> Target {
Target {
llvm_target: "aarch64-unknown-freebsd".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
host_tools: None,
std: None,
description: Some("ARM64 FreeBSD".into()),
tier: Some(3),
host_tools: Some(true),
std: Some(true),
},
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ pub fn target() -> Target {
Target {
llvm_target: "aarch64-unknown-fuchsia".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
host_tools: None,
std: None,
description: Some("ARM64 Fuchsia".into()),
tier: Some(2),
host_tools: Some(false),
std: Some(true),
},
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ pub fn target() -> Target {
Target {
llvm_target: "aarch64-unknown-hermit".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
host_tools: None,
std: None,
description: Some("ARM64 Hermit".into()),
tier: Some(3),
host_tools: Some(false),
std: Some(true),
},
pointer_width: 64,
arch: "aarch64".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ pub fn target() -> Target {
// so we still pass Solaris to it
llvm_target: "aarch64-unknown-solaris2.11".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
host_tools: None,
std: None,
description: Some("ARM64 illumos".into()),
tier: Some(3),
host_tools: Some(true),
std: Some(true),
},
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ pub fn target() -> Target {
Target {
llvm_target: "aarch64-unknown-linux-gnu".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
host_tools: None,
std: None,
description: Some("ARM64 Linux (kernel 4.1, glibc 2.17+)".into()),
tier: Some(1),
host_tools: Some(true),
std: Some(true),
},
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ pub fn target() -> Target {
Target {
llvm_target: "aarch64-unknown-linux-gnu_ilp32".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
host_tools: None,
std: None,
description: Some("ARM64 Linux (ILP32 ABI)".into()),
tier: Some(3),
host_tools: Some(true),
std: Some(true),
},
pointer_width: 32,
data_layout: "e-m:e-p:32:32-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ pub fn target() -> Target {
Target {
llvm_target: "aarch64-unknown-linux-musl".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
host_tools: None,
std: None,
description: Some("ARM64 Linux with musl 1.2.3".into()),
tier: Some(2),
host_tools: Some(true),
std: Some(true),
},
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ pub fn target() -> Target {
// LLVM 15 doesn't support OpenHarmony yet, use a linux target instead.
llvm_target: "aarch64-unknown-linux-musl".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
host_tools: None,
std: None,
description: Some("ARM64 OpenHarmony".into()),
tier: Some(2),
host_tools: Some(false),
std: Some(true),
},
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ pub fn target() -> Target {
Target {
llvm_target: "aarch64-unknown-netbsd".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
host_tools: None,
std: None,
description: Some("ARM64 NetBSD".into()),
tier: Some(3),
host_tools: Some(true),
std: Some(true),
},
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ pub fn target() -> Target {
Target {
llvm_target: "aarch64-unknown-none".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
host_tools: None,
std: None,
description: Some("Bare ARM64, hardfloat".into()),
tier: Some(2),
host_tools: Some(false),
std: Some(false),
},
pointer_width: 64,
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),
Expand Down
Loading

0 comments on commit adeb79d

Please sign in to comment.