Add comment to explain why CG_RUSTFLAGS is needed
This commit is contained in:
parent
bbc54734de
commit
f24b0d358a
2 changed files with 4 additions and 0 deletions
|
|
@ -150,6 +150,8 @@ pub fn build_sysroot(env: &HashMap<String, String>, config: &ConfigInfo) -> Resu
|
|||
"debug"
|
||||
};
|
||||
|
||||
// We have a different environment variable than RUSTFLAGS to make sure those flags are only
|
||||
// sent to rustc_codegen_gcc and not the LLVM backend.
|
||||
if let Ok(cg_rustflags) = std::env::var("CG_RUSTFLAGS") {
|
||||
rustflags.push(' ');
|
||||
rustflags.push_str(&cg_rustflags);
|
||||
|
|
|
|||
|
|
@ -381,6 +381,8 @@ impl ConfigInfo {
|
|||
}
|
||||
|
||||
// This environment variable is useful in case we want to change options of rustc commands.
|
||||
// We have a different environment variable than RUSTFLAGS to make sure those flags are
|
||||
// only sent to rustc_codegen_gcc and not the LLVM backend.
|
||||
if let Some(cg_rustflags) = env.get("CG_RUSTFLAGS") {
|
||||
rustflags.extend_from_slice(&split_args(&cg_rustflags)?);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue