}
for component in &components {
- let mut flag = String::from("-DLLVM_COMPONENT_");
+ let mut flag = String::from("LLVM_COMPONENT_");
flag.push_str(&component.to_uppercase());
- cfg.flag(&flag);
+ cfg.define(&flag, None);
}
if env::var_os("LLVM_RUSTLLVM").is_some() {
- cfg.flag("-DLLVM_RUSTLLVM");
+ cfg.define("LLVM_RUSTLLVM", None);
}
build_helper::rerun_if_changed_anything_in_dir(Path::new("../rustllvm"));
let llvm_static_stdcpp = env::var_os("LLVM_STATIC_STDCPP");
let stdcppname = if target.contains("openbsd") {
- // OpenBSD has a particular C++ runtime library name
- "estdc++"
+ // llvm-config on OpenBSD doesn't mention stdlib=libc++
+ "c++"
} else if target.contains("netbsd") && llvm_static_stdcpp.is_some() {
// NetBSD uses a separate library when relocation is required
"stdc++_pic"