about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-05-23 00:26:22 +0800
committerGitHub <noreply@github.com>2018-05-23 00:26:22 +0800
commit28e43582a3b2d1724cd81dfd88cb2a54e85e9544 (patch)
tree72104c45bb6216c39f6fa394ab69ab975b279c9a /src/bootstrap
parente6495d12b6cbf334827212574e2689f6c7cf268f (diff)
parente44d804f7d295ab87ef16f0d03e5cf60295c322f (diff)
downloadrust-28e43582a3b2d1724cd81dfd88cb2a54e85e9544.tar.gz
rust-28e43582a3b2d1724cd81dfd88cb2a54e85e9544.zip
Rollup merge of #50961 - Zoxc:fix-filecheck, r=alexcrichton
Fix FileCheck finding with MSVC
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/lib.rs18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index e53fef06786..f64161fb027 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -592,12 +592,20 @@ impl Build {
             Path::new(llvm_bindir.trim()).join(exe("FileCheck", &*target))
         } else {
             let base = self.llvm_out(self.config.build).join("build");
-            let exe = exe("FileCheck", &*target);
-            if !self.config.ninja && self.config.build.contains("msvc") {
-                base.join("Release/bin").join(exe)
+            let base = if !self.config.ninja && self.config.build.contains("msvc") {
+                if self.config.llvm_optimize {
+                    if self.config.llvm_release_debuginfo {
+                        base.join("RelWithDebInfo")
+                    } else {
+                        base.join("Release")
+                    }
+                } else {
+                    base.join("Debug")
+                }
             } else {
-                base.join("bin").join(exe)
-            }
+                base
+            };
+            base.join("bin").join(exe("FileCheck", &*target))
         }
     }