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

Simplify bootstrap --check-cfg arguments #119441

Merged
merged 2 commits into from
Dec 31, 2023

Conversation

Urgau
Copy link
Member

@Urgau Urgau commented Dec 30, 2023

This PR simplifies the generated check-cfg arguments generated for the no-values case.

For the bootstrap cfg:

- --check-cfg=cfg(bootstrap,values())
+ --check-cfg=cfg(bootstrap)

Those are equivalent, so there isn't any semantic difference; but the invocation is shorter and less distracting.

@rustbot label +F-check-cfg

@rustbot
Copy link
Collaborator

rustbot commented Dec 30, 2023

r? @onur-ozkan

(rustbot has picked a reviewer for you, use r? to override)

@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) F-check-cfg --check-cfg labels Dec 30, 2023
Copy link
Member

@onur-ozkan onur-ozkan left a comment

Choose a reason for hiding this comment

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

If we making changes here I expect seperating the logic and write unit tests on it.

@Urgau
Copy link
Member Author

Urgau commented Dec 30, 2023

If we making changes here I expect seperating the logic and write unit tests on it.

Sure, and were should the function and it's unit-test be?

@onur-ozkan
Copy link
Member

Sure, and were should the function and it's unit-test be?

I think function can be right below EXTRA_CHECK_CFGS in lib.rs, and tests can be under tests/builder.rs

@Urgau
Copy link
Member Author

Urgau commented Dec 30, 2023

@onur-ozkan After looking at similar functions I move the logic to helpers.rs and added some unit-tests under tests/helpers.rs.

Copy link
Member

@onur-ozkan onur-ozkan left a comment

Choose a reason for hiding this comment

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

LGTM, r=me with or without the suggestion

@Urgau
Copy link
Member Author

Urgau commented Dec 30, 2023

LGTM, r=me with or without the suggestion

👍 but I don't have a r+ rights 😅

@onur-ozkan
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Dec 31, 2023

📌 Commit a236bdd has been approved by onur-ozkan

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 Dec 31, 2023
@bors
Copy link
Contributor

bors commented Dec 31, 2023

⌛ Testing commit a236bdd with merge fcfe05a...

@bors
Copy link
Contributor

bors commented Dec 31, 2023

☀️ Test successful - checks-actions
Approved by: onur-ozkan
Pushing fcfe05a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 31, 2023
@bors bors merged commit fcfe05a into rust-lang:master Dec 31, 2023
@rustbot rustbot added this to the 1.77.0 milestone Dec 31, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (fcfe05a): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 668.357s -> 667.255s (-0.16%)
Artifact size: 311.73 MiB -> 311.75 MiB (0.01%)

@Urgau Urgau deleted the check-cfg-simplify-bootstrap-args branch December 31, 2023 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-check-cfg --check-cfg 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. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants