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

bootstrap sets -Zunstable-options on "check" but not "build", leading to build script reruns #116538

Closed
RalfJung opened this issue Oct 8, 2023 · 5 comments · Fixed by #117850
Closed
Assignees
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@RalfJung
Copy link
Member

RalfJung commented Oct 8, 2023

When working on Miri I noticed "portable-atomics" gets rebuilt every time I switch between a check-build and actutally running tests. This boils down to RUSTFLAGS being different between the two invocations: in check builds it contains -Zunstable-options but in test builds it does not.

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Oct 8, 2023
@RalfJung
Copy link
Member Author

RalfJung commented Oct 8, 2023

Cc @rust-lang/bootstrap

@onur-ozkan onur-ozkan added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Oct 8, 2023
@saethlin saethlin added C-bug Category: This is a bug. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Oct 9, 2023
@onur-ozkan
Copy link
Member

HEAD: 7cc997d

image

Seems working fine here.

@RalfJung
Copy link
Member Author

RalfJung commented Nov 8, 2023

I'll have to try if I can till reproduce. But note that I mentioned "test build" above, so this would be ./x.py check miri vs ./x.py test --stage 0 miri.

@RalfJung
Copy link
Member Author

RalfJung commented Nov 8, 2023

Yeah I can still reproduce the problems with those invocations. (It's not the latest master but recent enough: 3089c31.) Sorry for not giving the exact commands in the issue description.

@onur-ozkan
Copy link
Member

gets rebuilt every time I switch between a check-build and actutally running tests

I missed the tests part, sorry.

I just reproduce it too. I will be working on it by the coming week.

@rustbot claim

onur-ozkan added a commit to onur-ozkan/rust that referenced this issue Nov 12, 2023
We unconditionally set this to avoid recompiling tools between
`x check $tool` and `x test $tool` executions.

See rust-lang#116538 for more information.

Signed-off-by: onur-ozkan <[email protected]>
@bors bors closed this as completed in 3644594 Nov 17, 2023
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Nov 17, 2023
Rollup merge of rust-lang#117850 - onur-ozkan:fix-116538, r=Mark-Simulacrum

bootstrap: simplify setting unstable-options for tools

Previously, we unconditionally(instead of `if path == "src/tools/clippy" || ..`) set this (to prevent recompiling tools between `x check $tool` and '` check $another_tool` executions) specifically for tools in the `x check` step. This PR relocates that logic to `fn prepare_tool_cargo`, making it step-agnostic.

Fixes rust-lang#116538
Fixes rust-lang#117983
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants