Merge pull request #493 from darcagn/master

Fix passing custom CG_RUSTFLAGS when building sysroot
This commit is contained in:
antoyo 2024-04-17 18:11:52 -04:00 committed by GitHub
commit ab7d138d16
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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))?;