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

Always check cg_llvm with ./x.py check #93273

Merged
merged 1 commit into from
Feb 25, 2022

Conversation

bjorn3
Copy link
Member

@bjorn3 bjorn3 commented Jan 24, 2022

Previously it would be skipped if codegen-backends doesn't contain llvm.

@bjorn3 bjorn3 added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Jan 24, 2022
@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 24, 2022
@Mark-Simulacrum
Copy link
Member

Can you say more about the motivation here? It feels odd to me to override an explicit preference from the user here.

It's worth noting that this sort of kind-sensitivity typically causes us trouble -- e.g., switching between x.py check and x.py build ideally doesn't cause (essentially) spurious rebuilds, but I suspect this change as-is may well cause that as the feature set changes for the rustc crate. Can you confirm whether this happens for you with this change (and llvm disabled in config.toml, of course)?

@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 31, 2022
@bjorn3
Copy link
Member Author

bjorn3 commented Jan 31, 2022

Can you say more about the motivation here? It feels odd to me to override an explicit preference from the user here.

./x.py check already checks cg_clif and I think cg_gcc even if you don't explicitly enable them. I personally disable cg_llvm to avoid having to build llvm. A check run doesn't need to build llvm anyway, so it only cost a couple of seconds while ensuring I don't break cg_llvm.

It's worth noting that this sort of kind-sensitivity typically causes us trouble -- e.g., switching between x.py check and x.py build ideally doesn't cause (essentially) spurious rebuilds, but I suspect this change as-is may well cause that as the feature set changes for the rustc crate.

./x.py check runs with the dev profile and ./x.py build with the release profile, so they shouldn't clobber each others caches.

@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 31, 2022
@Mark-Simulacrum
Copy link
Member

Is this patch enough for you locally? For me, if I enable this patch and set codegen-backends = ["cranelift"], then I get a compilation failure during x.py check as part of the rustc_llvm build. I believe this is because of the auto-enabling if LLVM has already been built before here, even in check mode, which presumably falls down due to observing two different things or getting skipped?

In any case, I don't think this should land until this bug is squashed out - it's not the most common configuration locally, but it seems like at least somewhat plausible one, so I'd rather avoid merging this.

If you can't manage to reproduce, let me know, I can try to minimize -- I suspect it's just a matter of building before this PR without any codegen-backends config (and download-ci-llvm = true / a local build of LLVM), and then checking out this PR with LLVM omitted.

Having written that out, this may also be a pre-existing bug, but it seems to me like that code I linked still seems plausibly buggy when used in conjunction with this PR -- I would expect us to need to change it to avoid problems.

@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 5, 2022
Previously it would be skipped if codegen-backends doesn't contain llvm.
@bjorn3
Copy link
Member Author

bjorn3 commented Feb 23, 2022

I can't reproduce this issue.

@bjorn3 bjorn3 force-pushed the rustbuild_improvements branch from 2400c2a to 512cc35 Compare February 23, 2022 18:03
@Mark-Simulacrum
Copy link
Member

Repeated attempts didn't produce failures for me either. Sorry for the run around.

@bors r+

@bors
Copy link
Contributor

bors commented Feb 24, 2022

📌 Commit 512cc35 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 24, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 25, 2022
…askrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#92714 (Provide ignore message in the result of test)
 - rust-lang#93273 (Always check cg_llvm with ./x.py check)
 - rust-lang#94068 (Consider mutations as borrows in generator drop tracking)
 - rust-lang#94184 (BTree: simplify test code)
 - rust-lang#94297 (update const_generics_defaults release notes)
 - rust-lang#94341 (Remove a duplicate space)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit ae6770e into rust-lang:master Feb 25, 2022
@rustbot rustbot added this to the 1.61.0 milestone Feb 25, 2022
@bjorn3 bjorn3 deleted the rustbuild_improvements branch February 25, 2022 12:46
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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants