Skip to content

Commit b8a919a

Browse files
Rollup merge of #153419 - durin42:missing-dashes, r=cuviper
rustc_llvm: add missing `-` to flag-comparison logic The build script here wants to sniff for `-stdlib=libc++` but was missing the leading dashes. We caught this on the Rust/LLVM HEADs builder which also uses libc++.
2 parents fed3c49 + cbc711e commit b8a919a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

compiler/rustc_llvm/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,15 +476,15 @@ fn main() {
476476
// C++ runtime library
477477
if !target.contains("msvc") {
478478
if let Some(s) = llvm_static_stdcpp {
479-
assert!(cxxflags_iter.all(|flag| flag != "stdlib=libc++"));
479+
assert!(cxxflags_iter.all(|flag| flag != "-stdlib=libc++"));
480480
let path = PathBuf::from(s);
481481
println!("cargo:rustc-link-search=native={}", path.parent().unwrap().display());
482482
if target.contains("windows") {
483483
println!("cargo:rustc-link-lib=static:-bundle={stdcppname}");
484484
} else {
485485
println!("cargo:rustc-link-lib=static={stdcppname}");
486486
}
487-
} else if cxxflags_iter.any(|flag| flag == "stdlib=libc++") {
487+
} else if cxxflags_iter.any(|flag| flag == "-stdlib=libc++") {
488488
println!("cargo:rustc-link-lib=c++");
489489
} else {
490490
println!("cargo:rustc-link-lib={stdcppname}");

0 commit comments

Comments
 (0)