Browse Source

Disable automatic turning off defaults

Causes issues like #380 and the last comment on #374, so let's leave
this as just an explicit env var for now.

Closes #380
urgh
Alex Crichton 6 years ago
parent
commit
3d0abff484
  1. 5
      src/lib.rs

5
src/lib.rs

@ -1097,10 +1097,7 @@ impl Build {
// Disable default flag generation via environment variable or when
// certain cross compiling arguments are set
let use_defaults = self.getenv("CRATE_CC_NO_DEFAULTS").is_none()
&& !(envflags.iter().any(|ref arg| {
arg.starts_with("-m") || arg.starts_with("/arch") || arg.starts_with("--target")
}));
let use_defaults = self.getenv("CRATE_CC_NO_DEFAULTS").is_none();
if use_defaults {
self.add_default_flags(&mut cmd, &target, &opt_level)?;

Loading…
Cancel
Save