Skip to content
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

Cleanup check-cfg handling in core and std #125452

Merged
merged 4 commits into from
May 24, 2024

Conversation

Urgau
Copy link
Member

@Urgau Urgau commented May 23, 2024

Follow-up to #125296 where we:

  • expect any feature cfg in std, due to #[path] imports
  • move some check-cfg args inside the build.rs as per Cargo recommendation
  • and replace the fake Cargo feature "restricted-std" by the custom cfg restricted_std

Fixes #125296 (comment)
r? @bjorn3 (maybe, feel free to re-roll)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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. labels May 23, 2024
@Urgau Urgau force-pushed the check-cfg-libraries-cleanup branch from 4d078df to 45ad60d Compare May 23, 2024 14:09
@bjorn3
Copy link
Member

bjorn3 commented May 23, 2024

@bors r+

@bors
Copy link
Contributor

bors commented May 23, 2024

📌 Commit 45ad60d has been approved by bjorn3

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 23, 2024
# This matches `EXTRA_CHECK_CFGS` in `src/bootstrap/src/lib.rs`.
# core use #[path] imports to portable-simd `core_simd` crate
# and to stdarch `core_arch` crate which messes-up with Cargo list
# of declared features, we therefor expect any feature cfg
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# of declared features, we therefor expect any feature cfg
# of declared features, we therefore expect any feature cfg

bors added a commit to rust-lang-ci/rust that referenced this pull request May 23, 2024
…llaumeGomez

Rollup of 6 pull requests

Successful merges:

 - rust-lang#125263 (rust-lld: fallback to rustc's sysroot if there's no path to the linker in the target sysroot)
 - rust-lang#125345 (rustc_codegen_llvm: add support for writing summary bitcode)
 - rust-lang#125362 (Actually use TAIT instead of emulating it)
 - rust-lang#125412 (Don't suggest adding the unexpected cfgs to the build-script it-self)
 - rust-lang#125445 (Migrate `run-make/rustdoc-with-short-out-dir-option` to `rmake.rs`)
 - rust-lang#125452 (Cleanup check-cfg handling in core and std)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request May 24, 2024
…llaumeGomez

Rollup of 6 pull requests

Successful merges:

 - rust-lang#125263 (rust-lld: fallback to rustc's sysroot if there's no path to the linker in the target sysroot)
 - rust-lang#125345 (rustc_codegen_llvm: add support for writing summary bitcode)
 - rust-lang#125362 (Actually use TAIT instead of emulating it)
 - rust-lang#125412 (Don't suggest adding the unexpected cfgs to the build-script it-self)
 - rust-lang#125445 (Migrate `run-make/rustdoc-with-short-out-dir-option` to `rmake.rs`)
 - rust-lang#125452 (Cleanup check-cfg handling in core and std)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit a8a71d0 into rust-lang:master May 24, 2024
6 checks passed
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request May 24, 2024
Rollup merge of rust-lang#125452 - Urgau:check-cfg-libraries-cleanup, r=bjorn3

Cleanup check-cfg handling in core and std

Follow-up to rust-lang#125296 where we:
 - expect any feature cfg in std, due to `#[path]` imports
 - move some check-cfg args inside the `build.rs` as per Cargo recommendation
 - and replace the fake Cargo feature `"restricted-std"` by the custom cfg `restricted_std`

Fixes rust-lang#125296 (comment)
r? `@bjorn3` (maybe, feel free to re-roll)
@rustbot rustbot added this to the 1.80.0 milestone May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants