Skip to content

Commit 970b2c7

Browse files
Fix build_sysroot by adding missing RUSTFLAGS environment variable
1 parent 7d71b87 commit 970b2c7

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

build_system/src/build.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ fn build_sysroot_inner(
141141
rustflags.push_str(" -Cpanic=abort -Zpanic-abort-tests");
142142
}
143143
rustflags.push_str(" -Z force-unstable-if-unmarked");
144+
let mut env = env.clone();
144145
let channel = if sysroot_release_channel {
145-
let mut env = env.clone();
146146
env.insert(
147147
"RUSTFLAGS".to_string(),
148148
format!("{} -Zmir-opt-level=3", rustflags),
@@ -160,10 +160,15 @@ fn build_sysroot_inner(
160160
)?;
161161
"release"
162162
} else {
163+
env.insert(
164+
"RUSTFLAGS".to_string(),
165+
rustflags,
166+
);
167+
163168
run_command_with_output_and_env(
164169
&[&"cargo", &"build", &"--target", &config.target],
165170
Some(start_dir),
166-
Some(env),
171+
Some(&env),
167172
)?;
168173
"debug"
169174
};

0 commit comments

Comments
 (0)