]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_llvm/build.rs
rustc_llvm: use cc::Build::define
[rust.git] / src / librustc_llvm / build.rs
index 141a9a8d704d2ee473f7a51cf590169800aba784..d860c6c44f024f7a269d7830936abaa39335a498 100644 (file)
@@ -154,13 +154,13 @@ fn main() {
     }
 
     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"));