Skip to content

Commit f8a2141

Browse files
committed
enable toolset spec only if NMake generator is not selected
1 parent 037fe78 commit f8a2141

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,10 +406,14 @@ impl Config {
406406
// If we're on MSVC we need to be sure to use the right generator or
407407
// otherwise we won't get 32/64 bit correct automatically.
408408
// This also guarantees that NMake generator isn't chosen implicitly.
409+
let using_nmake_generator;
409410
if self.generator.is_none() {
410411
cmd.arg("-G").arg(self.visual_studio_generator(&target));
412+
using_nmake_generator = false;
413+
} else {
414+
using_nmake_generator = self.generator.as_ref().unwrap() == "NMake Makefiles";
411415
}
412-
if target.contains("x86_64") && !is_ninja {
416+
if target.contains("x86_64") && !is_ninja && !using_nmake_generator {
413417
cmd.arg("-Thost=x64");
414418
}
415419
} else if target.contains("redox") {

0 commit comments

Comments
 (0)