-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Use the in-tree compiler-builtins
for the sysroot
#141993
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
Merged
Merged
+98
−34
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment has been minimized.
This comment has been minimized.
bjorn3
reviewed
Jun 4, 2025
bjorn3
reviewed
Jun 4, 2025
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
rust-bors bot
added a commit
that referenced
this pull request
Jun 4, 2025
WIP: Use the in-tree compiler-builtins for the sysroot Zulip discussion: [#t-compiler > Using in-tree compiler-builtins](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Using.20in-tree.20compiler-builtins/with/522445336) try-job: x86_64-gnu try-job: test-various
94592d3
to
3c91330
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
e3edcc4
to
145c702
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
rust-bors bot
added a commit
that referenced
this pull request
Jun 4, 2025
WIP: Use the in-tree compiler-builtins for the sysroot Many of `std`'s dependency have a dependency on the crates.io `compiler-builtins` when used with the feature `rustc-std-workspace-core`. Use a Cargo patch to select the in-tree version instead. `compiler-builtins` is also added as a dependency of `rustc-std-workspace-core` so these crates can remove their crates.io dependency in the future. Zulip discussion: [#t-compiler > Using in-tree compiler-builtins](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Using.20in-tree.20compiler-builtins/with/522445336) try-job: x86_64-gnu try-job: x86_64-gnu-aux try-job: test-various
This comment was marked as outdated.
This comment was marked as outdated.
145c702
to
a543f01
Compare
This comment was marked as outdated.
This comment was marked as outdated.
bors
added a commit
that referenced
this pull request
Jun 8, 2025
Use the in-tree `compiler-builtins` for the sysroot Many of `std`'s dependency have a dependency on the crates.io `compiler-builtins` when used with the feature `rustc-std-workspace-core`. Use a Cargo patch to select the in-tree version instead. `compiler-builtins` is also added as a dependency of `rustc-std-workspace-core` so these crates can remove their crates.io dependency in the future. Zulip discussion: [#t-compiler > Using in-tree compiler-builtins](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Using.20in-tree.20compiler-builtins/with/522445336) Once this merges, the following PRs will need to make it to a release for the relevant crates: - rust-lang/getopts#119 (can merge at any time) - rust-lang/hashbrown#625 (can merge at any time) - rust-lang/stdarch#1825 - rust-lang/rustc-demangle#80 - rust-lang/cfg-if#84 - unicode-rs/unicode-width#77 The above should cover all tier 1 targets with no `std` features enabled. The remaining cover the rest: - alexcrichton/dlmalloc-rs#50 (wasm, xous, sgx) - gimli-rs/gimli#769 - r-efi/r-efi#89 (efi) - r-efi/r-efi-alloc#9 (efi) - fortanix/rust-sgx#770 (sgx) - hermit-os/hermit-rs#718 (hermit) - bytecodealliance/wasi-rs#108 (wasi) - gimli-rs/addr2line#345 - oyvindln/adler2#2 - BurntSushi/memchr#180 - Frommi/miniz_oxide#173 - gimli-rs/object#777 try-job: dist-x86_64-linux try-job: x86_64-gnu try-job: x86_64-gnu-aux try-job: test-various
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
@bors2 try jobs= |
rust-bors bot
added a commit
that referenced
this pull request
Jun 8, 2025
Use the in-tree `compiler-builtins` for the sysroot Many of `std`'s dependency have a dependency on the crates.io `compiler-builtins` when used with the feature `rustc-std-workspace-core`. Use a Cargo patch to select the in-tree version instead. `compiler-builtins` is also added as a dependency of `rustc-std-workspace-core` so these crates can remove their crates.io dependency in the future. Zulip discussion: [#t-compiler > Using in-tree compiler-builtins](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Using.20in-tree.20compiler-builtins/with/522445336) Once this merges, the following PRs will need to make it to a release for the relevant crates: - rust-lang/getopts#119 (can merge at any time) - rust-lang/hashbrown#625 (can merge at any time) - rust-lang/stdarch#1825 - rust-lang/rustc-demangle#80 - rust-lang/cfg-if#84 - unicode-rs/unicode-width#77 The above should cover all tier 1 targets with no `std` features enabled. The remaining cover the rest: - alexcrichton/dlmalloc-rs#50 (wasm, xous, sgx) - gimli-rs/gimli#769 - r-efi/r-efi#89 (efi) - r-efi/r-efi-alloc#9 (efi) - fortanix/rust-sgx#770 (sgx) - hermit-os/hermit-rs#718 (hermit) - bytecodealliance/wasi-rs#108 (wasi) - gimli-rs/addr2line#345 - oyvindln/adler2#2 - BurntSushi/memchr#180 - Frommi/miniz_oxide#173 - gimli-rs/object#777 try-job: x86_64-gnu try-job: test-various try-job: `*various*`
💔 Test failed
|
There are a few places that violate this lint, which showed up in rust-lang/rust CI (the relevent module is gated behind `kernel_user_helpers` which is only set for `armv4t`, `armv5te`, and `arm-linux-androideabi`; none of these are tested in compiler-builtins CI). Add new `unsafe { /* ... */ }` blocks where needed to address this. Some blocks should get a more thorough review of their preconditions, so their safety comments are left as `FIXME`s.
On the ILP32 `x86_64-unknown-linux-gnux32` target, `usize` is 32 bits so there is a sub-register alignment warning. Specify the 64-bit `r` registers, which matches the current default as well as the size of the other operands in the routines.
The `build.rs` entrypoint returns early for some targets, so emscripten and OpenBSD were not getting check-cfg set. Emit these earlier to avoid the `unexpected_cfgs` lint.
448db09
to
fc71544
Compare
@bors2 try jobs= |
rust-bors bot
added a commit
that referenced
this pull request
Jun 9, 2025
Use the in-tree `compiler-builtins` for the sysroot Many of `std`'s dependency have a dependency on the crates.io `compiler-builtins` when used with the feature `rustc-std-workspace-core`. Use a Cargo patch to select the in-tree version instead. `compiler-builtins` is also added as a dependency of `rustc-std-workspace-core` so these crates can remove their crates.io dependency in the future. Zulip discussion: [#t-compiler > Using in-tree compiler-builtins](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Using.20in-tree.20compiler-builtins/with/522445336) Once this merges, the following PRs will need to make it to a release for the relevant crates: - rust-lang/getopts#119 (can merge at any time) - rust-lang/hashbrown#625 (can merge at any time) - rust-lang/stdarch#1825 - rust-lang/rustc-demangle#80 - rust-lang/cfg-if#84 - unicode-rs/unicode-width#77 The above should cover all tier 1 targets with no `std` features enabled. The remaining cover the rest: - alexcrichton/dlmalloc-rs#50 (wasm, xous, sgx) - gimli-rs/gimli#769 - r-efi/r-efi#89 (efi) - r-efi/r-efi-alloc#9 (efi) - fortanix/rust-sgx#770 (sgx) - hermit-os/hermit-rs#718 (hermit) - bytecodealliance/wasi-rs#108 (wasi) - gimli-rs/addr2line#345 - oyvindln/adler2#2 - BurntSushi/memchr#180 - Frommi/miniz_oxide#173 - gimli-rs/object#777 try-job: x86_64-gnu try-job: test-various try-job: `*various*`
Two small lint-related fixes on targets that aren't tested in compiler-builtins CI. I also locally checked that compiler-builtins builds without warning on all of @bors r=bjorn3 |
oyvindln
pushed a commit
to Frommi/miniz_oxide
that referenced
this pull request
Jun 9, 2025
Since [1], this will come automatically from `rustc-std-workspace-core` and the crates.io dependency should no longer be specified. [1]: rust-lang/rust#141993
bors
added a commit
that referenced
this pull request
Jun 9, 2025
Rollup of 5 pull requests Successful merges: - #140767 (Stabilize `sha512`, `sm3` and `sm4` for x86) - #141001 (Make NonZero<char> possible) - #141993 (Use the in-tree `compiler-builtins` for the sysroot) - #142208 (Always consider `const _` items as live for dead code analysis) - #142238 (stabilize nonnull_provenance) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
that referenced
this pull request
Jun 9, 2025
Rollup merge of #141993 - tgross35:use-in-tree-builtins, r=bjorn3 Use the in-tree `compiler-builtins` for the sysroot Many of `std`'s dependency have a dependency on the crates.io `compiler-builtins` when used with the feature `rustc-std-workspace-core`. Use a Cargo patch to select the in-tree version instead. `compiler-builtins` is also added as a dependency of `rustc-std-workspace-core` so these crates can remove their crates.io dependency in the future. Zulip discussion: [#t-compiler > Using in-tree compiler-builtins](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Using.20in-tree.20compiler-builtins/with/522445336) Once this merges, the following PRs will need to make it to a release for the relevant crates: - rust-lang/getopts#119 (can merge at any time) - rust-lang/hashbrown#625 (can merge at any time) - rust-lang/stdarch#1825 - rust-lang/rustc-demangle#80 - rust-lang/cfg-if#84 - unicode-rs/unicode-width#77 The above should cover all tier 1 targets with no `std` features enabled. The remaining cover the rest: - alexcrichton/dlmalloc-rs#50 (wasm, xous, sgx) - gimli-rs/gimli#769 - r-efi/r-efi#89 (efi) - r-efi/r-efi-alloc#9 (efi) - fortanix/rust-sgx#770 (sgx) - hermit-os/hermit-rs#718 (hermit) - bytecodealliance/wasi-rs#108 (wasi) - gimli-rs/addr2line#345 - oyvindln/adler2#2 - BurntSushi/memchr#180 - Frommi/miniz_oxide#173 - gimli-rs/object#777 try-job: x86_64-gnu try-job: test-various
tgross35
added a commit
to tgross35/rust-sgx
that referenced
this pull request
Jun 9, 2025
Since [1], this will come automatically from `rustc-std-workspace-core` and the crates.io dependency should no longer be specified. [1]: rust-lang/rust#141993
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-compiler-builtins
Area: compiler-builtins (https://github.com/rust-lang/compiler-builtins)
A-run-make
Area: port run-make Makefiles to rmake.rs
A-tidy
Area: The tidy tool
rla-silenced
Silences rust-log-analyzer postings to the PR it's added on.
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Many of
std
's dependency have a dependency on the crates.iocompiler-builtins
when used with the featurerustc-std-workspace-core
. Use a Cargo patch to select the in-tree version instead.compiler-builtins
is also added as a dependency ofrustc-std-workspace-core
so these crates can remove their crates.io dependency in the future.Zulip discussion: #t-compiler > Using in-tree compiler-builtins
Once this merges, the following PRs will need to make it to a release for the relevant crates:
compiler-builtins
fromrustc-dep-of-std
dependencies stdarch#1825compiler-builtins
fromrustc-dep-of-std
dependencies rustc-demangle#80compiler-builtins
fromrustc-dep-of-std
dependencies cfg-if#84compiler-builtins
fromrustc-dep-of-std
dependencies unicode-rs/unicode-width#77The above should cover all tier 1 targets with no
std
features enabled. The remaining cover the rest:compiler-builtins
fromrustc-dep-of-std
dependencies alexcrichton/dlmalloc-rs#50 (wasm, xous, sgx)compiler-builtins
fromrustc-dep-of-std
dependencies gimli-rs/gimli#769compiler-builtins
fromrustc-dep-of-std
dependencies r-efi/r-efi#89 (efi)compiler-builtins
fromrustc-dep-of-std
dependencies r-efi/r-efi-alloc#9 (efi)compiler-builtins
fromrustc-dep-of-std
dependencies fortanix/rust-sgx#770 (sgx)compiler-builtins
fromrustc-dep-of-std
dependencies hermit-os/hermit-rs#718 (hermit)compiler-builtins
fromrustc-dep-of-std
dependencies bytecodealliance/wasi-rs#108 (wasi)compiler-builtins
fromrustc-dep-of-std
dependencies gimli-rs/addr2line#345compiler-builtins
fromrustc-dep-of-std
dependencies oyvindln/adler2#2compiler-builtins
fromrustc-dep-of-std
dependencies BurntSushi/memchr#180compiler-builtins
fromrustc-dep-of-std
dependencies Frommi/miniz_oxide#173compiler-builtins
fromrustc-dep-of-std
dependencies gimli-rs/object#777try-job: x86_64-gnu
try-job: test-various