Skip to content

Commit

Permalink
Stylistic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Sep 23, 2019
1 parent 1607871 commit 9b34ef6
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions src/bootstrap/builder.rs
Expand Up @@ -1079,12 +1079,9 @@ impl<'a> Builder<'a> {
} }
} }


match mode { if let Mode::Rustc | Mode::Codegen = mode {
Mode::Rustc | Mode::Codegen => { rustflags.arg("-Zunstable-options");
rustflags.arg("-Zunstable-options"); rustflags.arg("-Wrustc::internal");
rustflags.arg("-Wrustc::internal");
}
_ => {}
} }


// Throughout the build Cargo can execute a number of build scripts // Throughout the build Cargo can execute a number of build scripts
Expand Down Expand Up @@ -1230,11 +1227,8 @@ impl<'a> Builder<'a> {
// When we build Rust dylibs they're all intended for intermediate // When we build Rust dylibs they're all intended for intermediate
// usage, so make sure we pass the -Cprefer-dynamic flag instead of // usage, so make sure we pass the -Cprefer-dynamic flag instead of
// linking all deps statically into the dylib. // linking all deps statically into the dylib.
match mode { if let Mode::Std | Mode::Rustc | Mode::Codegen = mode {
Mode::Std | Mode::Rustc | Mode::Codegen => { rustflags.arg("-Cprefer-dynamic");
rustflags.arg("-Cprefer-dynamic");
}
_ => {}
} }


Cargo { Cargo {
Expand Down Expand Up @@ -1348,7 +1342,7 @@ impl Rustflags {
fn new(target: &str, cmd: &mut Command) -> Rustflags { fn new(target: &str, cmd: &mut Command) -> Rustflags {
let mut ret = Rustflags(String::new()); let mut ret = Rustflags(String::new());


// Inherit `RUSTFLAGS` by default // Inherit `RUSTFLAGS` by default ...
ret.env("RUSTFLAGS"); ret.env("RUSTFLAGS");


// ... and also handle target-specific env RUSTFLAGS if they're // ... and also handle target-specific env RUSTFLAGS if they're
Expand All @@ -1358,7 +1352,7 @@ impl Rustflags {
ret.env(&target_specific); ret.env(&target_specific);
cmd.env_remove(&target_specific); cmd.env_remove(&target_specific);


return ret; ret
} }


fn env(&mut self, env: &str) { fn env(&mut self, env: &str) {
Expand Down

0 comments on commit 9b34ef6

Please sign in to comment.