We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0658259 commit 08c8996Copy full SHA for 08c8996
src/bootstrap/builder.rs
@@ -1405,8 +1405,16 @@ impl Cargo {
1405
1406
impl From<Cargo> for Command {
1407
fn from(mut cargo: Cargo) -> Command {
1408
- cargo.command.env("RUSTFLAGS", &cargo.rustflags.0);
1409
- cargo.command.env("RUSTDOCFLAGS", &cargo.rustdocflags.0);
+ let rustflags = &cargo.rustflags.0;
+ if !rustflags.is_empty() {
1410
+ cargo.command.env("RUSTFLAGS", rustflags);
1411
+ }
1412
+
1413
+ let rustdocflags = &cargo.rustdocflags.0;
1414
+ if !rustdocflags.is_empty() {
1415
+ cargo.command.env("RUSTDOCFLAGS", rustdocflags);
1416
1417
1418
cargo.command
1419
}
1420
0 commit comments