Skip to content

Commit 5dd102e

Browse files
authored
Rollup merge of #133867 - taiki-e:platform-support, r=Noratrieb
Fix "std" support status of some tier 3 targets #127265 marked targets with empty "std" support status as no-std targets in target-spec metadata: > * 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 However, this is not accurate because "std" support status has a marker indicating that it is a no-std target. (empty status is just invalid.) https://doc.rust-lang.org/nightly/rustc/platform-support.html#tier-3 > The `std` column in the table below has the following meanings: > > * ✓ indicates the full standard library is available. > * \* indicates the target only supports [`no_std`] development. > * ? indicates the standard library support is unknown or a work-in-progress. > > [`no_std`]: https://rust-embedded.github.io/book/intro/no-std.html This PR fixes the status of targets whose "std" support status is currently set to empty and update target-spec metadata. The new status is set based on the following criteria: - Set to ✓ for targets that I regularly check in [rust-cross-toolchain](https://github.com/taiki-e/rust-cross-toolchain) that the `cargo test` works. (riscv32-unknown-linux-gnu,{riscv64,s390x}-unknown-linux-musl) - Targets where `cargo run` works but `cargo test` does not work tend to have incomplete std support (e.g., riscv32 musl taiki-e/rust-cross-toolchain@f3068b6), so I included them in the group below that means “work in progress” rather than in this group. - Set powerpc64le FreeBSD to ✓ on both std and host_tools, because the [Rust package](https://www.freshports.org/lang/rust/) is available. - Set to ? (which means "unknown" or “work in progress”) for all other affected targets because these are Linux, Android, FreeBSD, or Fuchsia, all of which are operating systems that support std if properly supported. r? Noratrieb cc ``@harmou01``
2 parents f5f8a1f + e3638e2 commit 5dd102e

23 files changed

+31
-31
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pub(crate) fn target() -> Target {
77
description: Some("Armv4T Linux".into()),
88
tier: Some(3),
99
host_tools: Some(false),
10-
std: None, // ?
10+
std: Some(true),
1111
},
1212
pointer_width: 32,
1313
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pub(crate) fn target() -> Target {
77
description: Some("Armv5TE Linux with uClibc".into()),
88
tier: Some(3),
99
host_tools: Some(false),
10-
std: None, // ?
10+
std: Some(true),
1111
},
1212
pointer_width: 32,
1313
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub(crate) fn target() -> Target {
1212
description: Some("Motorola 680x0 Linux".into()),
1313
tier: Some(3),
1414
host_tools: Some(false),
15-
std: None, // ?
15+
std: Some(true),
1616
},
1717
pointer_width: 32,
1818
data_layout: "E-m:e-p:32:16:32-i8:8:8-i16:16:16-i32:16:32-n8:16:32-a:0:16-S16".into(),

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub(crate) fn target() -> Target {
1717
description: Some("MIPS64 for OpenWrt Linux musl 1.2.3".into()),
1818
tier: Some(3),
1919
host_tools: Some(false),
20-
std: None, // ?
20+
std: Some(true),
2121
},
2222
pointer_width: 64,
2323
data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(),

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pub(crate) fn target() -> Target {
88
description: Some("32-bit MIPS Release 6 Big Endian".into()),
99
tier: Some(3),
1010
host_tools: Some(false),
11-
std: None, // ?
11+
std: Some(true),
1212
},
1313
pointer_width: 32,
1414
data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".into(),

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pub(crate) fn target() -> Target {
77
description: Some("32-bit MIPS Release 6 Little Endian".into()),
88
tier: Some(3),
99
host_tools: Some(false),
10-
std: None, // ?
10+
std: Some(true),
1111
},
1212
pointer_width: 32,
1313
data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".into(),

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pub(crate) fn target() -> Target {
88
description: Some("64-bit MIPS Release 6 Big Endian".into()),
99
tier: Some(3),
1010
host_tools: Some(false),
11-
std: None, // ?
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".into(),

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub(crate) fn target() -> Target {
1414
description: Some("64-bit PowerPC Linux with musl 1.2.3".into()),
1515
tier: Some(3),
1616
host_tools: Some(false),
17-
std: None, // ?
17+
std: Some(true),
1818
},
1919
pointer_width: 64,
2020
data_layout: "E-m:e-Fn32-i64:64-n32:64-S128-v256:256:256-v512:512:512".into(),

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ pub(crate) fn target() -> Target {
1212
metadata: crate::spec::TargetMetadata {
1313
description: Some("PPC64LE FreeBSD".into()),
1414
tier: Some(3),
15-
host_tools: Some(false),
16-
std: Some(false),
15+
host_tools: Some(true),
16+
std: Some(true),
1717
},
1818
pointer_width: 64,
1919
data_layout: "e-m:e-Fn32-i64:64-n32:64".into(),

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub(crate) fn target() -> Target {
1313
description: Some("64-bit PowerPC Linux with musl 1.2.3, Little Endian".into()),
1414
tier: Some(3),
1515
host_tools: Some(false),
16-
std: None, // ?
16+
std: Some(true),
1717
},
1818
pointer_width: 64,
1919
data_layout: "e-m:e-Fn32-i64:64-n32:64-S128-v256:256:256-v512:512:512".into(),

0 commit comments

Comments
 (0)