Skip to content

Conversation

Urgau
Copy link
Member

@Urgau Urgau commented Mar 8, 2022

This pull-request enable conditional checking of (well known) values in the Rust codebase.

Well known values were added in #94362. All the target_* values are taken from all the built-in targets which is why some extra values were needed do be added as they are not (yet ?) defined in any built-in targets.

r? @Mark-Simulacrum

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 8, 2022
@rust-log-analyzer

This comment has been minimized.

@Urgau
Copy link
Member Author

Urgau commented Mar 8, 2022

cc @petrochenkov: the above failure is due to the unexpected_cfg lint fire-ring on #[cfg(target_pointer_width = "8")] as "8" is not an expected value. I could add "8" to the list of extra values for std but I wonder if it wouldn't be better to set the list of target_pointer_width to 8, 16, 32, 64 and 128 (the current one are: 16, 32, 64) in the compiler instead of relying on the built-in targets for it ?

@petrochenkov
Copy link
Contributor

target_pointer_width = "8" looks like a mistake, I'm not aware of any out-of-tree targets using it, and there's a bunch of places in the compiler that produce asserts on any pointer width except for 16 | 32 | 64.

@Urgau Urgau force-pushed the rustbuild-check-cfg-values branch from 828a89c to 1739793 Compare March 8, 2022 23:30
@Urgau
Copy link
Member Author

Urgau commented Mar 11, 2022

Just in case you haven't seen that it was ready for another review.

@rustbot ready

@Mark-Simulacrum
Copy link
Member

@bors r+ rollup=iffy

@bors
Copy link
Collaborator

bors commented Mar 13, 2022

📌 Commit 1739793 has been approved by Mark-Simulacrum

@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 Mar 13, 2022
@bors
Copy link
Collaborator

bors commented Mar 13, 2022

⌛ Testing commit 1739793 with merge 21b0325...

@bors
Copy link
Collaborator

bors commented Mar 13, 2022

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing 21b0325 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 13, 2022
@bors bors merged commit 21b0325 into rust-lang:master Mar 13, 2022
@rustbot rustbot added this to the 1.61.0 milestone Mar 13, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (21b0325): comparison url.

Summary: This benchmark run did not return any relevant results.

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

@Urgau Urgau deleted the rustbuild-check-cfg-values branch May 5, 2023 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants