diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2023-11-24 21:34:29 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2023-12-04 15:29:23 +0100 |
| commit | 970b2c770010c044abe5e3a8433fffc4ab3b8d52 (patch) | |
| tree | b1ed40571b8898a2af8ce89142b2c763a2ec523e | |
| parent | 7d71b87691c22d54a1119a491647db63d28b55d3 (diff) | |
| download | rust-970b2c770010c044abe5e3a8433fffc4ab3b8d52.tar.gz rust-970b2c770010c044abe5e3a8433fffc4ab3b8d52.zip | |
Fix `build_sysroot` by adding missing `RUSTFLAGS` environment variable
| -rw-r--r-- | build_system/src/build.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/build_system/src/build.rs b/build_system/src/build.rs index 3087a5d79e0..da29e87c33c 100644 --- a/build_system/src/build.rs +++ b/build_system/src/build.rs @@ -141,8 +141,8 @@ fn build_sysroot_inner( rustflags.push_str(" -Cpanic=abort -Zpanic-abort-tests"); } rustflags.push_str(" -Z force-unstable-if-unmarked"); + let mut env = env.clone(); let channel = if sysroot_release_channel { - let mut env = env.clone(); env.insert( "RUSTFLAGS".to_string(), format!("{} -Zmir-opt-level=3", rustflags), @@ -160,10 +160,15 @@ fn build_sysroot_inner( )?; "release" } else { + env.insert( + "RUSTFLAGS".to_string(), + rustflags, + ); + run_command_with_output_and_env( &[&"cargo", &"build", &"--target", &config.target], Some(start_dir), - Some(env), + Some(&env), )?; "debug" }; |
