Browse Source

Merge pull request #246 from Jake-Shadle/flag_check_fix

fix(flag_check): Send flag to MSVC telling it not to link
cl-test
Alex Crichton 7 years ago
committed by GitHub
parent
commit
8d64b6dc39
  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