Rollup merge of #50961 - Zoxc:fix-filecheck, r=alexcrichton

Fix FileCheck finding with MSVC
This commit is contained in:
kennytm 2018-05-23 00:26:22 +08:00 committed by GitHub
commit 28e43582a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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))
}
}