Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,13 @@ pub fn rustc(build: &Build, target: &str, compiler: &Compiler) {
if let Some(s) = target_config.and_then(|c| c.llvm_config.as_ref()) {
cargo.env("CFG_LLVM_ROOT", s);
}
// Set CC and CXX for crates that use extern crate gcc.
if let Some(s) = target_config.and_then(|c| c.cc.as_ref()) {
cargo.env("CC", s);
}
if let Some(s) = target_config.and_then(|c| c.cxx.as_ref()) {
cargo.env("CXX", s);
}
// Building with a static libstdc++ is only supported on linux right now,
// not for MSVC or macOS
if build.config.llvm_static_stdcpp &&
Expand Down