-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix "std" support status of some tier 3 targets #133867
Conversation
These commits modify compiler targets. |
@@ -13,7 +13,7 @@ pub(crate) fn target() -> Target { | |||
description: Some("PPC64LE FreeBSD".into()), | |||
tier: Some(3), | |||
host_tools: Some(false), | |||
std: Some(false), | |||
std: None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std: None, | |
std: Some(true), |
it's FreeBSD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As #127265 did, when "std" support status is “?” I used “None”, but is FreeBSD special?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, in powerpc64le, the Rust package is available, so both std
and host_tools
should be Some(true)
. On the other hand, the Rust package for powerpc and riscv does not seem to be available, so I guess None (unknown) is appropriate.
Updated powerpc64le freebsd target spec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FreeBSD is an operating system supported by std, and so is Linux and Fuchsia. Can you set all those to true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marked all Linux/Android/BSD/Fuchsia as supporting "std" in target-spec metadata.
(I was set them to None
because I thought there is a plan to mechanically synchronize them with platform-support.md (the status of targets with work-in-progress std support is “?” in platform-support.md, and I thought “None” in metadata would correspond to this), but if not, I think it is reasonable to set them to true since they are “targets where std support is expected to eventually be available even if currently work-in-progress”.)
compiler/rustc_target/src/spec/targets/powerpc_unknown_freebsd.rs
Outdated
Show resolved
Hide resolved
compiler/rustc_target/src/spec/targets/riscv64gc_unknown_freebsd.rs
Outdated
Show resolved
Hide resolved
efd54b0
to
76f9aa1
Compare
a481a36
to
e3638e2
Compare
@bors r+ rollup |
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`
Rollup of 6 pull requests Successful merges: - rust-lang#127565 (Teach rustc about the Xtensa VaListImpl) - rust-lang#133844 (clarify simd_relaxed_fma non-determinism) - rust-lang#133867 (Fix "std" support status of some tier 3 targets) - rust-lang#133882 (Improve comments for the default backtrace printer) - rust-lang#133888 (Improve bootstrap job objects) - rust-lang#133898 (skip `setup::Hook` on non-git sources) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 6 pull requests Successful merges: - rust-lang#127565 (Teach rustc about the Xtensa VaListImpl) - rust-lang#133844 (clarify simd_relaxed_fma non-determinism) - rust-lang#133867 (Fix "std" support status of some tier 3 targets) - rust-lang#133882 (Improve comments for the default backtrace printer) - rust-lang#133888 (Improve bootstrap job objects) - rust-lang#133898 (skip `setup::Hook` on non-git sources) r? `@ghost` `@rustbot` modify labels: rollup
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``
#127265 marked targets with empty "std" support status as no-std targets in target-spec metadata:
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
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:
cargo test
works. (riscv32-unknown-linux-gnu,{riscv64,s390x}-unknown-linux-musl)cargo run
works butcargo 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.r? Noratrieb
cc @harmou01