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

Rebuilding LLVM after a submodule update is too lazy #122612

Closed
Zalathar opened this issue Mar 17, 2024 · 0 comments · Fixed by #122632
Closed

Rebuilding LLVM after a submodule update is too lazy #122612

Zalathar opened this issue Mar 17, 2024 · 0 comments · Fixed by #122632
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

@Zalathar
Copy link
Contributor

There's a pattern I've been noticing when building the compiler after a recent LLVM submodule update.

If I do git checkout master && git pull (which happens to include an LLVM submodule update), and then do x build library, the build system will make sure that the LLVM submodule is properly fetched, but it won't actually rebuild LLVM. Instead the build command exits successfully, presumably using the old LLVM artifacts.

Then if I do x build library a second time, the build system notices that LLVM is stale, and actually rebuilds it.

@rustbot label +T-bootstrap

@rustbot rustbot added needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Mar 17, 2024
@onur-ozkan onur-ozkan removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 17, 2024
@onur-ozkan onur-ozkan self-assigned this Mar 17, 2024
@onur-ozkan onur-ozkan added the C-bug Category: This is a bug. label Mar 17, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Apr 16, 2024
…=albertlarsan68

fetch submodule before checking llvm stamp

Previously, we were checking the LLVM stamp before fetching the submodule which leads to not being able to compile llvm on submodule updates.

Fixes rust-lang#122612
Fixes rust-lang#122787
@bors bors closed this as completed in 592b1ca Apr 16, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Apr 16, 2024
Rollup merge of rust-lang#122632 - onur-ozkan:fix-llvm-caching-bug, r=albertlarsan68

fetch submodule before checking llvm stamp

Previously, we were checking the LLVM stamp before fetching the submodule which leads to not being able to compile llvm on submodule updates.

Fixes rust-lang#122612
Fixes rust-lang#122787
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.

3 participants