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

rustc_llvm need to be rebuilt after ./x.py check #71152

Closed
matthiaskrgr opened this issue Apr 14, 2020 · 4 comments · Fixed by #71815
Closed

rustc_llvm need to be rebuilt after ./x.py check #71152

matthiaskrgr opened this issue Apr 14, 2020 · 4 comments · Fixed by #71815
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

@matthiaskrgr
Copy link
Member

repo @ edc0258
running

./x.py build
./x.py check

invalidates the build cache for the rustc_llvm crate.
This means that after

./x.py build
./x.py check
./x.py build

the last x.py build will have to rebuild rustc_llvm, rustc_codegen_llvm, rustc_interface, rustc_driver and rustc-main which is less than optional given no code was changed.

@matthiaskrgr matthiaskrgr added the C-bug Category: This is a bug. label Apr 14, 2020
@jonas-schievink jonas-schievink added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Apr 14, 2020
@matthiaskrgr matthiaskrgr changed the title rustc_llvm need so be rebuild after ./x.py check rustc_llvm need to be rebuilt after ./x.py check Apr 14, 2020
@cuviper
Copy link
Member

cuviper commented Apr 14, 2020

I think it's because of this:

// Set a flag for `check`/`clippy`/`fix`, so that certain build
// scripts can do less work (e.g. not building/requiring LLVM).
if cmd == "check" || cmd == "clippy" || cmd == "fix" {
cargo.env("RUST_CHECK", "1");
}

if env::var_os("RUST_CHECK").is_some() {
// If we're just running `check`, there's no need for LLVM to be built.
println!("cargo:rerun-if-env-changed=RUST_CHECK");
return;
}

@Mark-Simulacrum
Copy link
Member

Interesting. Ideally we'd have two separate caches for rustc_llvm and the other crates such that x.py check doesn't affect this... I think.

@jonas-schievink
Copy link
Contributor

Is there any workaround for this other than not using ./x.py check?

@Mark-Simulacrum
Copy link
Member

Fixed in #71815

@bors bors closed this as completed in 0a675c5 May 3, 2020
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