Skip to content

Commit ab7d138

Browse files
authored
Merge pull request #493 from darcagn/master
Fix passing custom CG_RUSTFLAGS when building sysroot
2 parents 6e5395a + 50a0d5b commit ab7d138

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

build_system/src/build.rs

+5
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,11 @@ pub fn build_sysroot(env: &HashMap<String, String>, config: &ConfigInfo) -> Resu
153153
"debug"
154154
};
155155

156+
if let Ok(cg_rustflags) = std::env::var("CG_RUSTFLAGS") {
157+
rustflags.push(' ');
158+
rustflags.push_str(&cg_rustflags);
159+
}
160+
156161
let mut env = env.clone();
157162
env.insert("RUSTFLAGS".to_string(), rustflags);
158163
run_command_with_output_and_env(&args, Some(&start_dir), Some(&env))?;

0 commit comments

Comments
 (0)