The compiler LLVM is rebuilt whenever the built version of LLVM doesn't have the right hash. (Previously it was rebuilt based on a special marker file, which was easier to work around.)
|
if done_stamp.exists() { |
|
if let Some(llvm_commit) = llvm_info.sha() { |
|
let done_contents = t!(fs::read(&done_stamp)); |
|
|
|
// If LLVM was already built previously and the submodule's commit didn't change |
|
// from the previous build, then no action is required. |
|
if done_contents == llvm_commit.as_bytes() { |
|
return build_llvm_config; |
|
} |
|
} else { |
|
builder.info( |
|
"Could not determine the LLVM submodule commit hash. \ |
|
Assuming that an LLVM rebuild is not necessary.", |
|
); |
|
builder.info(&format!( |
|
"To force LLVM to rebuild, remove the file `{}`", |
|
done_stamp.display() |
|
)); |
|
return build_llvm_config; |
|
} |
|
} |
However, most of the time, having the latest LLVM version is not necessary, but makes rebuilding rustc after rebasing take significantly longer, which is a pain. It would be good to be able to disable this as an option in
x.py for convenience.
This issue has been assigned to @matthew-healy via this comment.
The compiler LLVM is rebuilt whenever the built version of LLVM doesn't have the right hash. (Previously it was rebuilt based on a special marker file, which was easier to work around.)
rust/src/bootstrap/native.rs
Lines 88 to 108 in f042687
However, most of the time, having the latest LLVM version is not necessary, but makes rebuilding rustc after rebasing take significantly longer, which is a pain. It would be good to be able to disable this as an option in
x.pyfor convenience.This issue has been assigned to @matthew-healy via this comment.