about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTamir Duberstein <tamird@gmail.com>2017-11-26 16:25:49 -0500
committerTamir Duberstein <tamird@gmail.com>2017-11-28 18:15:30 -0500
commit9067d9735a9ef96f64c32ed41c120faa0976c772 (patch)
treea18df75d920a389d17d82ce56a39d23f7e22cbcd
parent658ea389fd753049bd8ef3f100ee4edb9c9f2a44 (diff)
downloadrust-9067d9735a9ef96f64c32ed41c120faa0976c772.tar.gz
rust-9067d9735a9ef96f64c32ed41c120faa0976c772.zip
rustc_llvm: use cc::Build::define
-rw-r--r--src/librustc_llvm/build.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_llvm/build.rs b/src/librustc_llvm/build.rs
index 141a9a8d704..d860c6c44f0 100644
--- a/src/librustc_llvm/build.rs
+++ b/src/librustc_llvm/build.rs
@@ -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"));