]> git.lizzy.rs Git - rust.git/commitdiff
Skip LLVM rebuild when skip-rebuild is true
authorMatthew Healy <matthew.healy@soundcloud.com>
Thu, 19 Dec 2019 19:42:01 +0000 (20:42 +0100)
committerMatthew Healy <matthew.healy@soundcloud.com>
Thu, 26 Dec 2019 22:19:18 +0000 (22:19 +0000)
src/bootstrap/native.rs

index afee154fe714314e614fb30f540219d47b44de37..2a4e9903e5527d4a4c801c0c53000499e453253c 100644 (file)
@@ -70,6 +70,15 @@ fn run(self, builder: &Builder<'_>) -> PathBuf {
         let done_stamp = out_dir.join("llvm-finished-building");
 
         if done_stamp.exists() {
+            if builder.config.llvm_skip_rebuild {
+                builder.info(
+                    "Warning: \
+                    Using a potentially stale build of LLVM; \
+                    This may not behave well.",
+                );
+                return build_llvm_config;
+            }
+
             if let Some(llvm_commit) = llvm_info.sha() {
                 let done_contents = t!(fs::read(&done_stamp));