Browse Source

fix(flag_check): Send flag to MSVC telling it not to link

cl-test
Jake Shadle 7 years ago
parent
commit
fce58d62a1
  1. 7
      src/lib.rs

7
src/lib.rs

@ -342,6 +342,13 @@ impl Build {
let compiler = cfg.try_get_compiler()?;
let mut cmd = compiler.to_command();
command_add_output_file(&mut cmd, &obj, target.contains("msvc"), false);
// We need to explicitly tell msvc not to link and create an exe
// in the root directory of the crate
if target.contains("msvc") {
cmd.arg("/c");
}
cmd.arg(&src);
let output = cmd.output()?;

Loading…
Cancel
Save