Skip to content

Remove compiler-builtins from rustc-dep-of-std dependencies - #769

Merged
philipc merged 1 commit into
gimli-rs:masterfrom
tgross35:remove-compiler-builtins
Jun 11, 2025
Merged

Remove compiler-builtins from rustc-dep-of-std dependencies#769
philipc merged 1 commit into
gimli-rs:masterfrom
tgross35:remove-compiler-builtins

Conversation

@tgross35

@tgross35 tgross35 commented Jun 5, 2025

Copy link
Copy Markdown
Contributor

Since 1, this will come automatically from rustc-std-workspace-core and the crates.io dependency should no longer be specified.

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
@tgross35

tgross35 commented Jun 5, 2025

Copy link
Copy Markdown
Contributor Author

This will be able to merge once rust-lang/rust#141993 does. If a release is possible soon after, that would be ideal (but it isn't pressing since this is only used as part of std on xous).

@philipc

philipc commented Jun 6, 2025

Copy link
Copy Markdown
Collaborator

I thought gimli was dependency for more targets than xous due to being a dependency of backtrace.

@philipc

philipc commented Jun 6, 2025

Copy link
Copy Markdown
Collaborator

addr2line also has compiler-builtins in its rustc-dep-of-std dependencies.

@tgross35

tgross35 commented Jun 6, 2025

Copy link
Copy Markdown
Contributor Author

Yup you are right, I wasn't checking with the right feature sets. Looks like I'll still need PRs to addr2line, adler2, memchr, miniz_oxide, and object.

$ cargo tree -i compiler_builtins --target=all --all-features
compiler_builtins v0.1.160
├── addr2line v0.24.2
│   └── std v0.0.0 (/Users/tmgross/Documents/projects/rust/library/std)
│       ├── proc_macro v0.0.0 (/Users/tmgross/Documents/projects/rust/library/proc_macro)
│       │   └── sysroot v0.0.0 (/Users/tmgross/Documents/projects/rust/library/sysroot)
│       ├── rustc-std-workspace-std v1.99.0 (/Users/tmgross/Documents/projects/rust/library/rustc-std-workspace-std)
│       │   ├── getopts v0.2.21
│       │   │   └── test v0.0.0 (/Users/tmgross/Documents/projects/rust/library/test)
│       │   │       └── sysroot v0.0.0 (/Users/tmgross/Documents/projects/rust/library/sysroot)
│       │   ├── rustc-literal-escaper v0.0.2
│       │   │   └── proc_macro v0.0.0 (/Users/tmgross/Documents/projects/rust/library/proc_macro) (*)
│       │   └── unicode-width v0.1.14
│       │       └── getopts v0.2.21 (*)
│       ├── sysroot v0.0.0 (/Users/tmgross/Documents/projects/rust/library/sysroot)
│       └── test v0.0.0 (/Users/tmgross/Documents/projects/rust/library/test) (*)
├── adler2 v2.0.0
│   └── miniz_oxide v0.8.8
│       └── std v0.0.0 (/Users/tmgross/Documents/projects/rust/library/std) (*)
├── alloc v0.0.0 (/Users/tmgross/Documents/projects/rust/library/alloc)
│   ├── panic_abort v0.0.0 (/Users/tmgross/Documents/projects/rust/library/panic_abort)
│   │   └── std v0.0.0 (/Users/tmgross/Documents/projects/rust/library/std) (*)
│   ├── panic_unwind v0.0.0 (/Users/tmgross/Documents/projects/rust/library/panic_unwind)
│   │   └── std v0.0.0 (/Users/tmgross/Documents/projects/rust/library/std) (*)
│   ├── rustc-std-workspace-alloc v1.99.0 (/Users/tmgross/Documents/projects/rust/library/rustc-std-workspace-alloc)
│   │   ├── addr2line v0.24.2 (*)
│   │   ├── gimli v0.31.1
│   │   │   ├── addr2line v0.24.2 (*)
│   │   │   └── unwinding v0.2.6
│   │   │       └── unwind v0.0.0 (/Users/tmgross/Documents/projects/rust/library/unwind)
│   │   │           ├── panic_unwind v0.0.0 (/Users/tmgross/Documents/projects/rust/library/panic_unwind) (*)
│   │   │           └── std v0.0.0 (/Users/tmgross/Documents/projects/rust/library/std) (*)
│   │   ├── hashbrown v0.15.3
│   │   │   └── std v0.0.0 (/Users/tmgross/Documents/projects/rust/library/std) (*)
│   │   ├── hermit-abi v0.5.1
│   │   │   └── std v0.0.0 (/Users/tmgross/Documents/projects/rust/library/std) (*)
│   │   ├── miniz_oxide v0.8.8 (*)
│   │   ├── object v0.36.7
│   │   │   └── std v0.0.0 (/Users/tmgross/Documents/projects/rust/library/std) (*)
│   │   ├── std_detect v0.1.5 (/Users/tmgross/Documents/projects/rust/library/stdarch/crates/std_detect)
│   │   │   └── std v0.0.0 (/Users/tmgross/Documents/projects/rust/library/std) (*)
│   │   └── wasi v0.11.0+wasi-snapshot-preview1
│   │       └── std v0.0.0 (/Users/tmgross/Documents/projects/rust/library/std) (*)
│   └── std v0.0.0 (/Users/tmgross/Documents/projects/rust/library/std) (*)
├── cfg-if v1.0.0
│   ├── dlmalloc v0.2.8
│   │   └── std v0.0.0 (/Users/tmgross/Documents/projects/rust/library/std) (*)
│   ├── panic_unwind v0.0.0 (/Users/tmgross/Documents/projects/rust/library/panic_unwind) (*)
│   ├── std v0.0.0 (/Users/tmgross/Documents/projects/rust/library/std) (*)
│   ├── std_detect v0.1.5 (/Users/tmgross/Documents/projects/rust/library/stdarch/crates/std_detect) (*)
│   └── unwind v0.0.0 (/Users/tmgross/Documents/projects/rust/library/unwind) (*)
├── dlmalloc v0.2.8 (*)
├── fortanix-sgx-abi v0.5.0
│   └── std v0.0.0 (/Users/tmgross/Documents/projects/rust/library/std) (*)
├── gimli v0.31.1 (*)
├── hashbrown v0.15.3 (*)
├── hermit-abi v0.5.1 (*)
├── memchr v2.7.4
│   └── object v0.36.7 (*)
├── miniz_oxide v0.8.8 (*)
├── object v0.36.7 (*)
├── panic_abort v0.0.0 (/Users/tmgross/Documents/projects/rust/library/panic_abort) (*)
├── panic_unwind v0.0.0 (/Users/tmgross/Documents/projects/rust/library/panic_unwind) (*)
├── r-efi v5.2.0
│   ├── r-efi-alloc v2.0.0
│   │   └── std v0.0.0 (/Users/tmgross/Documents/projects/rust/library/std) (*)
│   └── std v0.0.0 (/Users/tmgross/Documents/projects/rust/library/std) (*)
├── r-efi-alloc v2.0.0 (*)
├── rustc-demangle v0.1.24
│   └── std v0.0.0 (/Users/tmgross/Documents/projects/rust/library/std) (*)
├── std v0.0.0 (/Users/tmgross/Documents/projects/rust/library/std) (*)
├── std_detect v0.1.5 (/Users/tmgross/Documents/projects/rust/library/stdarch/crates/std_detect) (*)
├── unicode-width v0.1.14 (*)
├── unwind v0.0.0 (/Users/tmgross/Documents/projects/rust/library/unwind) (*)
├── unwinding v0.2.6 (*)
└── wasi v0.11.0+wasi-snapshot-preview1 (*

To be clear, it shouldn't be overly bad if any crates don't remove the dependency ASAP. Some existing tooling like xargo just might not have the correct patch to make things work since there can't be two compiler-builtins in the crate graph, so hopefully if they break we can keep that time period reasonably short.

@philipc

philipc commented Jun 6, 2025

Copy link
Copy Markdown
Collaborator

That shouldn't be a problem. I hope to do gimli and addr2line releases in the near future, so this change can either be part of those or a small patch release afterwards.

@tgross35

tgross35 commented Jun 6, 2025

Copy link
Copy Markdown
Contributor Author

I appreciate the support. The missing crates should now all have PRs open.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 8, 2025
…jorn3

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
rust-bors Bot added a commit to rust-lang/rust 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
try-job: `*android*`
bors added a commit to rust-lang/rust 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
rust-bors Bot added a commit to rust-lang/rust 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*`
rust-bors Bot added a commit to rust-lang/rust 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*`
tgross35 added a commit to tgross35/rust that referenced this pull request Jun 9, 2025
…jorn3

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
rust-timer added a commit to rust-lang/rust 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
tgross35 marked this pull request as ready for review June 9, 2025 21:30
@tgross35

tgross35 commented Jun 9, 2025

Copy link
Copy Markdown
Contributor Author

The rust-lang/rust PR merged, so this, gimli-rs/addr2line#345, and gimli-rs/object#777 should be all set.

tgross35 added a commit to tgross35/compiler-builtins 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
github-actions Bot pushed a commit to rust-lang/miri that referenced this pull request Jun 10, 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
@philipc
philipc merged commit 767d6c5 into gimli-rs:master Jun 11, 2025
@philipc

philipc commented Jun 11, 2025

Copy link
Copy Markdown
Collaborator

I've published releases for all 3. backtrace-rs will need updating, and maybe thorin-dwp as well.

@tgross35
tgross35 deleted the remove-compiler-builtins branch June 11, 2025 17:13
@tgross35

Copy link
Copy Markdown
Contributor Author

Thank you for the support with this. I'm working through the dependency bumps with rust-lang/rust#142308, rust-lang/backtrace-rs#718, and nbdd0121/unwinding#48.

tautschnig pushed a commit to model-checking/verify-rust-std that referenced this pull request Jun 17, 2025
…jorn3

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
antoyo pushed a commit to rust-lang/rustc_codegen_gcc that referenced this pull request Jun 28, 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
tgross35 added a commit to rust-lang/compiler-builtins that referenced this pull request Jan 31, 2026
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants