Skip to content

Commit 28e4358

Browse files
authored
Rollup merge of #50961 - Zoxc:fix-filecheck, r=alexcrichton
Fix FileCheck finding with MSVC
2 parents e6495d1 + e44d804 commit 28e4358

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

src/bootstrap/lib.rs

+13-5
Original file line numberDiff line numberDiff line change
@@ -592,12 +592,20 @@ impl Build {
592592
Path::new(llvm_bindir.trim()).join(exe("FileCheck", &*target))
593593
} else {
594594
let base = self.llvm_out(self.config.build).join("build");
595-
let exe = exe("FileCheck", &*target);
596-
if !self.config.ninja && self.config.build.contains("msvc") {
597-
base.join("Release/bin").join(exe)
595+
let base = if !self.config.ninja && self.config.build.contains("msvc") {
596+
if self.config.llvm_optimize {
597+
if self.config.llvm_release_debuginfo {
598+
base.join("RelWithDebInfo")
599+
} else {
600+
base.join("Release")
601+
}
602+
} else {
603+
base.join("Debug")
604+
}
598605
} else {
599-
base.join("bin").join(exe)
600-
}
606+
base
607+
};
608+
base.join("bin").join(exe("FileCheck", &*target))
601609
}
602610
}
603611

0 commit comments

Comments
 (0)