Skip to content

compiler-builtins: Clean up features #142659

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tgross35
Copy link
Contributor

Remove the compiler-builtins from default because it prevents testing via the default cargo test command. It made more sense as a default when compiler-builtins was a dependency that some crates added via crates.io, but is no longer needed

The rustc-dep-of-std feature is also removed since it doesn't do anything notable.

r? @ghost

@rustbot rustbot added A-compiler-builtins Area: compiler-builtins (https://github.com/rust-lang/compiler-builtins) T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jun 18, 2025
@rust-log-analyzer

This comment has been minimized.

@tgross35 tgross35 force-pushed the builtins-features branch from 89b4e61 to 802792b Compare June 18, 2025 07:10
dependencies = [
"cc",
"rustc-std-workspace-core",
]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we now also pulling in compiler-builtins from crates.io?

Copy link
Contributor Author

@tgross35 tgross35 Jun 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea, it did this with the efi upgrade and I've been trying to figure out why. Cargo says this is a dependency of sgx, but I don't know why it isn't using the patch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sgx enables compiler-builtins/rustc-dep-of-std, so I guess this may be Cargo trying to resolve a now-removed feature. I'll see if they can do a release soon, or just keep the feature.

@rust-log-analyzer

This comment has been minimized.

Remove the `compiler-builtins` from default because it prevents testing
via the default `cargo test` command. It made more sense as a default
when `compiler-builtins` was a dependency that some crates added via
crates.io, but is no longer needed

The `rustc-dep-of-std` feature is also removed since it doesn't do
anything notable.
@tgross35 tgross35 force-pushed the builtins-features branch from 802792b to 5a5d4b8 Compare June 30, 2025 15:14
@rust-log-analyzer
Copy link
Collaborator

The job mingw-check-tidy failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
fmt check
fmt: checked 6131 files
tidy check

thread 'deps (.)' panicked at src/tools/tidy/src/deps.rs:598:24:
cmd.exec() failed with `cargo metadata` exited with an error:     Updating crates.io index
error: failed to select a version for `compiler_builtins`.
    ... required by package `fortanix-sgx-abi v0.5.0`
    ... which satisfies dependency `fortanix-sgx-abi = "^0.5.0"` (locked to 0.5.0) of package `std v0.0.0 (/checkout/library/std)`
    ... which satisfies path dependency `std` (locked to 0.0.0) of package `sysroot v0.0.0 (/checkout/library/sysroot)`
versions that meet the requirements `^0.1.0` (locked to 0.1.160) are: 0.1.160

package `fortanix-sgx-abi` depends on `compiler_builtins` with feature `rustc-dep-of-std` but `compiler_builtins` does not have that feature.


failed to select a version for `compiler_builtins` which could resolve this conflict

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

thread 'main' panicked at src/tools/tidy/src/main.rs:64:49:
called `Result::unwrap()` on an `Err` value: Any { .. }
Command has failed. Rerun with -v to see more details.
Build completed unsuccessfully in 0:00:48
  local time: Mon Jun 30 15:21:32 UTC 2025
  network time: Mon, 30 Jun 2025 15:21:32 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

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) T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants