Skip to content

Commit

Permalink
Unrolled build for rust-lang#133867
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#133867 - taiki-e:platform-support, r=Noratrieb

Fix "std" support status of some tier 3 targets

rust-lang#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``
  • Loading branch information
rust-timer authored Dec 5, 2024
2 parents 0e98766 + e3638e2 commit 9ae908f
Show file tree
Hide file tree
Showing 23 changed files with 31 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub(crate) fn target() -> Target {
description: Some("Armv4T Linux".into()),
tier: Some(3),
host_tools: Some(false),
std: None, // ?
std: Some(true),
},
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub(crate) fn target() -> Target {
description: Some("Armv5TE Linux with uClibc".into()),
tier: Some(3),
host_tools: Some(false),
std: None, // ?
std: Some(true),
},
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub(crate) fn target() -> Target {
description: Some("Motorola 680x0 Linux".into()),
tier: Some(3),
host_tools: Some(false),
std: None, // ?
std: Some(true),
},
pointer_width: 32,
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(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub(crate) fn target() -> Target {
description: Some("MIPS64 for OpenWrt Linux musl 1.2.3".into()),
tier: Some(3),
host_tools: Some(false),
std: None, // ?
std: Some(true),
},
pointer_width: 64,
data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub(crate) fn target() -> Target {
description: Some("32-bit MIPS Release 6 Big Endian".into()),
tier: Some(3),
host_tools: Some(false),
std: None, // ?
std: Some(true),
},
pointer_width: 32,
data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub(crate) fn target() -> Target {
description: Some("32-bit MIPS Release 6 Little Endian".into()),
tier: Some(3),
host_tools: Some(false),
std: None, // ?
std: Some(true),
},
pointer_width: 32,
data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub(crate) fn target() -> Target {
description: Some("64-bit MIPS Release 6 Big Endian".into()),
tier: Some(3),
host_tools: Some(false),
std: None, // ?
std: Some(true),
},
pointer_width: 64,
data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub(crate) fn target() -> Target {
description: Some("64-bit PowerPC Linux with musl 1.2.3".into()),
tier: Some(3),
host_tools: Some(false),
std: None, // ?
std: Some(true),
},
pointer_width: 64,
data_layout: "E-m:e-Fn32-i64:64-n32:64-S128-v256:256:256-v512:512:512".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ pub(crate) fn target() -> Target {
metadata: crate::spec::TargetMetadata {
description: Some("PPC64LE FreeBSD".into()),
tier: Some(3),
host_tools: Some(false),
std: Some(false),
host_tools: Some(true),
std: Some(true),
},
pointer_width: 64,
data_layout: "e-m:e-Fn32-i64:64-n32:64".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub(crate) fn target() -> Target {
description: Some("64-bit PowerPC Linux with musl 1.2.3, Little Endian".into()),
tier: Some(3),
host_tools: Some(false),
std: None, // ?
std: Some(true),
},
pointer_width: 64,
data_layout: "e-m:e-Fn32-i64:64-n32:64-S128-v256:256:256-v512:512:512".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub(crate) fn target() -> Target {
description: Some("PowerPC FreeBSD".into()),
tier: Some(3),
host_tools: Some(false),
std: Some(false),
std: Some(true),
},
pointer_width: 32,
data_layout: "E-m:e-p:32:32-Fn32-i64:64-n32".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub(crate) fn target() -> Target {
description: Some("PowerPC Linux with musl 1.2.3".into()),
tier: Some(3),
host_tools: Some(false),
std: None, // ?
std: Some(true),
},
pointer_width: 32,
data_layout: "E-m:e-p:32:32-Fn32-i64:64-n32".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub(crate) fn target() -> Target {
description: None,
tier: Some(3),
host_tools: Some(false),
std: None, // ?
std: Some(true),
},
pointer_width: 32,
data_layout: "E-m:e-p:32:32-Fn32-i64:64-n32".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub(crate) fn target() -> Target {
description: Some("RISC-V Linux (kernel 5.4, glibc 2.33)".into()),
tier: Some(3),
host_tools: Some(false),
std: Some(false),
std: Some(true),
},
pointer_width: 32,
data_layout: "e-m:e-p:32:32-i64:64-n32-S128".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub(crate) fn target() -> Target {
),
tier: Some(3),
host_tools: Some(false),
std: Some(false),
std: Some(true),
},
pointer_width: 32,
data_layout: "e-m:e-p:32:32-i64:64-n32-S128".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub(crate) fn target() -> Target {
description: Some("RISC-V 64-bit Android".into()),
tier: Some(3),
host_tools: Some(false),
std: Some(false),
std: Some(true),
},
pointer_width: 64,
data_layout: "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub(crate) fn target() -> Target {
description: Some("RISC-V FreeBSD".into()),
tier: Some(3),
host_tools: Some(false),
std: Some(false),
std: Some(true),
},
pointer_width: 64,
data_layout: "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub(crate) fn target() -> Target {
description: Some("RISC-V Fuchsia".into()),
tier: Some(3),
host_tools: Some(false),
std: Some(false),
std: Some(true),
},
pointer_width: 64,
data_layout: "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub(crate) fn target() -> Target {
description: Some("RISC-V Linux (kernel 4.20, musl 1.2.3)".into()),
tier: Some(3),
host_tools: Some(false),
std: Some(false),
std: Some(true),
},
pointer_width: 64,
data_layout: "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub(crate) fn target() -> Target {
description: Some("S390x Linux (kernel 3.2, musl 1.2.3)".into()),
tier: Some(3),
host_tools: Some(false),
std: Some(false),
std: Some(true),
},
pointer_width: 64,
data_layout: "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-v128:64-a:8:16-n32:64".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub(crate) fn target() -> Target {
description: Some("Thumb2-mode ARMv7-A Linux with NEON, musl 1.2.3".into()),
tier: Some(3),
host_tools: Some(false),
std: None, // ?
std: Some(true),
},
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub(crate) fn target() -> Target {
description: None,
tier: None,
host_tools: None,
std: None,
std: Some(true),
},
pointer_width: 64,
data_layout:
Expand Down
16 changes: 8 additions & 8 deletions src/doc/rustc/src/platform-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,15 +344,15 @@ target | std | host | notes
[`powerpc-wrs-vxworks-spe`](platform-support/vxworks.md) | ✓ | |
[`powerpc-wrs-vxworks`](platform-support/vxworks.md) | ✓ | |
`powerpc64-unknown-freebsd` | ✓ | ✓ | PPC64 FreeBSD (ELFv1 and ELFv2)
`powerpc64le-unknown-freebsd` | | | PPC64LE FreeBSD
`powerpc-unknown-freebsd` | | | PowerPC FreeBSD
`powerpc64le-unknown-freebsd` | ✓ | ✓ | PPC64LE FreeBSD
`powerpc-unknown-freebsd` | ? | | PowerPC FreeBSD
`powerpc64-unknown-linux-musl` | ? | | 64-bit PowerPC Linux with musl 1.2.3
[`powerpc64-wrs-vxworks`](platform-support/vxworks.md) | ✓ | |
`powerpc64le-unknown-linux-musl` | ? | | 64-bit PowerPC Linux with musl 1.2.3, Little Endian
[`powerpc64-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | OpenBSD/powerpc64
[`powerpc64-ibm-aix`](platform-support/aix.md) | ? | | 64-bit AIX (7.2 and newer)
`riscv32gc-unknown-linux-gnu` | | | RISC-V Linux (kernel 5.4, glibc 2.33)
`riscv32gc-unknown-linux-musl` | | | RISC-V Linux (kernel 5.4, musl 1.2.3 + RISCV32 support patches)
`riscv32gc-unknown-linux-gnu` | | | RISC-V Linux (kernel 5.4, glibc 2.33)
`riscv32gc-unknown-linux-musl` | ? | | RISC-V Linux (kernel 5.4, musl 1.2.3 + RISCV32 support patches)
[`riscv32im-risc0-zkvm-elf`](platform-support/riscv32im-risc0-zkvm-elf.md) | ? | | RISC Zero's zero-knowledge Virtual Machine (RV32IM ISA)
[`riscv32ima-unknown-none-elf`](platform-support/riscv32-unknown-none-elf.md) | * | | Bare RISC-V (RV32IMA ISA)
[`riscv32imac-unknown-xous-elf`](platform-support/riscv32imac-unknown-xous-elf.md) | ? | | RISC-V Xous (RV32IMAC ISA)
Expand All @@ -361,13 +361,13 @@ target | std | host | notes
[`riscv32imafc-esp-espidf`](platform-support/esp-idf.md) | ✓ | | RISC-V ESP-IDF
[`riscv32-wrs-vxworks`](platform-support/vxworks.md) | ✓ | |
[`riscv64gc-unknown-hermit`](platform-support/hermit.md) | ✓ | | RISC-V Hermit
`riscv64gc-unknown-freebsd` | | | RISC-V FreeBSD
`riscv64gc-unknown-fuchsia` | | | RISC-V Fuchsia
`riscv64gc-unknown-freebsd` | ? | | RISC-V FreeBSD
`riscv64gc-unknown-fuchsia` | ? | | RISC-V Fuchsia
[`riscv64gc-unknown-netbsd`](platform-support/netbsd.md) | ✓ | ✓ | RISC-V NetBSD
[`riscv64gc-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | OpenBSD/riscv64
[`riscv64-linux-android`](platform-support/android.md) | | | RISC-V 64-bit Android
[`riscv64-linux-android`](platform-support/android.md) | ? | | RISC-V 64-bit Android
[`riscv64-wrs-vxworks`](platform-support/vxworks.md) | ✓ | |
[`s390x-unknown-linux-musl`](platform-support/s390x-unknown-linux-musl.md) | | | S390x Linux (kernel 3.2, musl 1.2.3)
[`s390x-unknown-linux-musl`](platform-support/s390x-unknown-linux-musl.md) | | | S390x Linux (kernel 3.2, musl 1.2.3)
`sparc-unknown-linux-gnu` | ✓ | | 32-bit SPARC Linux
[`sparc-unknown-none-elf`](./platform-support/sparc-unknown-none-elf.md) | * | | Bare 32-bit SPARC V7+
[`sparc64-unknown-netbsd`](platform-support/netbsd.md) | ✓ | ✓ | NetBSD/sparc64
Expand Down

0 comments on commit 9ae908f

Please sign in to comment.