]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_llvm/build.rs
ci/netbsd: use the "official" cross compiler
[rust.git] / src / librustc_llvm / build.rs
index 2ee4cc49435611316e1a7e1d3b717dae609c8574..7f53e21675c781798dc56453abdb57cd33a3f54e 100644 (file)
@@ -47,8 +47,6 @@ fn detect_llvm_link(llvm_config: &Path) -> (&'static str, Option<&'static str>)
 }
 
 fn main() {
-    println!("cargo:rustc-cfg=cargobuild");
-
     let target = env::var("TARGET").expect("TARGET was not set");
     let llvm_config = env::var_os("LLVM_CONFIG")
         .map(PathBuf::from)
@@ -133,6 +131,12 @@ fn main() {
         if is_crossed && flag.starts_with("-m") {
             continue;
         }
+
+        // -Wdate-time is not supported by the netbsd cross compiler
+        if is_crossed && target.contains("netbsd") && flag.contains("date-time") {
+            continue;
+        }
+
         cfg.flag(flag);
     }
 
@@ -146,9 +150,7 @@ fn main() {
         cfg.flag("-DLLVM_RUSTLLVM");
     }
 
-    println!("cargo:rerun-if-changed=../rustllvm/PassWrapper.cpp");
-    println!("cargo:rerun-if-changed=../rustllvm/RustWrapper.cpp");
-    println!("cargo:rerun-if-changed=../rustllvm/ArchiveWrapper.cpp");
+    build_helper::rerun_if_changed_anything_in_dir(Path::new("../rustllvm"));
     cfg.file("../rustllvm/PassWrapper.cpp")
        .file("../rustllvm/RustWrapper.cpp")
        .file("../rustllvm/ArchiveWrapper.cpp")