diff options
| author | antoyo <antoyo@users.noreply.github.com> | 2024-04-17 18:11:52 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-17 18:11:52 -0400 |
| commit | ab7d138d1675939bd87ad9bd14bf1fc78d41edcd (patch) | |
| tree | ff87a6e305114d47d9f3a11b2a3b7444ced28b38 | |
| parent | 6e5395a4147f50c95b3f5952fcb62648a124cb88 (diff) | |
| parent | 50a0d5b8166f927142288ba0ce5ca0bbe250923a (diff) | |
| download | rust-ab7d138d1675939bd87ad9bd14bf1fc78d41edcd.tar.gz rust-ab7d138d1675939bd87ad9bd14bf1fc78d41edcd.zip | |
Merge pull request #493 from darcagn/master
Fix passing custom CG_RUSTFLAGS when building sysroot
| -rw-r--r-- | build_system/src/build.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/build_system/src/build.rs b/build_system/src/build.rs index 2ae325c6c00..a17adb3cd06 100644 --- a/build_system/src/build.rs +++ b/build_system/src/build.rs @@ -153,6 +153,11 @@ pub fn build_sysroot(env: &HashMap<String, String>, config: &ConfigInfo) -> Resu "debug" }; + if let Ok(cg_rustflags) = std::env::var("CG_RUSTFLAGS") { + rustflags.push(' '); + rustflags.push_str(&cg_rustflags); + } + let mut env = env.clone(); env.insert("RUSTFLAGS".to_string(), rustflags); run_command_with_output_and_env(&args, Some(&start_dir), Some(&env))?; |
