1 Avoid unnecessarily restarting the LLVM build and installing it
2 into STAGEDIR during the install phase.
4 https://github.com/rust-lang/rust/issues/61206
6 --- src/bootstrap/native.rs.orig 2019-05-22 05:39:52 UTC
7 +++ src/bootstrap/native.rs
8 @@ -92,17 +92,9 @@ impl Step for Llvm {
9 .join(exe("llvm-config", &*builder.config.build));
10 let done_stamp = out_dir.join("llvm-finished-building");
12 - if let Some(llvm_commit) = llvm_info.sha() {
13 if done_stamp.exists() {
14 - let done_contents = t!(fs::read(&done_stamp));
16 - // If LLVM was already built previously and the submodule's commit didn't change
17 - // from the previous build, then no action is required.
18 - if done_contents == llvm_commit.as_bytes() {
19 - return build_llvm_config
21 + return build_llvm_config
25 let _folder = builder.fold_output(|| "llvm");
26 let descriptor = if emscripten { "Emscripten " } else { "" };
27 @@ -218,6 +210,10 @@ impl Step for Llvm {
31 + if target == "powerpc64-unknown-freebsd" {
32 + cfg.define("CMAKE_EXE_LINKER_FLAGS", "-Wl,-rpath=/usr/local/lib/%CC% -L/usr/local/lib/%CC%");
35 // http://llvm.org/docs/HowToCrossCompileLLVM.html
36 if target != builder.config.build && !emscripten {
38 @@ -283,9 +279,7 @@ impl Step for Llvm {
42 - if let Some(llvm_commit) = llvm_info.sha() {
43 - t!(fs::write(&done_stamp, llvm_commit));
45 + t!(fs::write(&done_stamp, "done building LLVM"));