Fix passing custom CG_RUSTFLAGS when building sysroot
This commit is contained in:
parent
56a022f5e5
commit
50a0d5b816
@ -153,6 +153,11 @@ pub fn build_sysroot(env: &HashMap<String, String>, config: &ConfigInfo) -> Resu
|
|||||||
"debug"
|
"debug"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if let Ok(cg_rustflags) = std::env::var("CG_RUSTFLAGS") {
|
||||||
|
rustflags.push(' ');
|
||||||
|
rustflags.push_str(&cg_rustflags);
|
||||||
|
}
|
||||||
|
|
||||||
let mut env = env.clone();
|
let mut env = env.clone();
|
||||||
env.insert("RUSTFLAGS".to_string(), rustflags);
|
env.insert("RUSTFLAGS".to_string(), rustflags);
|
||||||
run_command_with_output_and_env(&args, Some(&start_dir), Some(&env))?;
|
run_command_with_output_and_env(&args, Some(&start_dir), Some(&env))?;
|
||||||
|
Loading…
Reference in New Issue
Block a user