Skip to content

Commit

Permalink
Merge pull request #493 from darcagn/master
Browse files Browse the repository at this point in the history
Fix passing custom CG_RUSTFLAGS when building sysroot
  • Loading branch information
antoyo authored Apr 17, 2024
2 parents 6e5395a + 50a0d5b commit ab7d138
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build_system/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))?;
Expand Down

0 comments on commit ab7d138

Please sign in to comment.