We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8acf40b + 9eb70d6 commit db66598Copy full SHA for db66598
src/bootstrap/src/lib.rs
@@ -1197,11 +1197,10 @@ impl Build {
1197
.filter(|s| !s.starts_with("-O") && !s.starts_with("/O"))
1198
.collect::<Vec<String>>();
1199
1200
- // If we're compiling on macOS then we add a few unconditional flags
1201
- // indicating that we want libc++ (more filled out than libstdc++) and
1202
- // we want to compile for 10.7. This way we can ensure that
+ // If we're compiling C++ on macOS then we add a flag indicating that
+ // we want libc++ (more filled out than libstdc++), ensuring that
1203
// LLVM/etc are all properly compiled.
1204
- if target.contains("apple-darwin") {
+ if matches!(c, CLang::Cxx) && target.contains("apple-darwin") {
1205
base.push("-stdlib=libc++".into());
1206
}
1207
0 commit comments