]> git.lizzy.rs Git - rust.git/commitdiff
Exclude Windows from LLVM_LINK_LLVM_DYLIB
authorJosh Stone <jistone@redhat.com>
Thu, 3 Aug 2017 22:42:05 +0000 (15:42 -0700)
committerJosh Stone <jistone@redhat.com>
Thu, 3 Aug 2017 22:42:05 +0000 (15:42 -0700)
src/bootstrap/native.rs

index 595f90be1dd6a8fcfe9a7666123a5f878882177e..ce0052a5fb6a7478f753156cb38007f5c1172831 100644 (file)
@@ -125,11 +125,19 @@ fn run(self, builder: &Builder) {
            .define("WITH_POLLY", "OFF")
            .define("LLVM_ENABLE_TERMINFO", "OFF")
            .define("LLVM_ENABLE_LIBEDIT", "OFF")
-           .define("LLVM_LINK_LLVM_DYLIB", "ON")
            .define("LLVM_PARALLEL_COMPILE_JOBS", build.jobs().to_string())
            .define("LLVM_TARGET_ARCH", target.split('-').next().unwrap())
            .define("LLVM_DEFAULT_TARGET_TRIPLE", target);
 
+
+        // This setting makes the LLVM tools link to the dynamic LLVM library,
+        // which saves both memory during parallel links and overall disk space
+        // for the tools.  We don't distribute any of those tools, so this is
+        // just a local concern.  However, this doesn't seem to work on Windows.
+        if !target.contains("windows") {
+           cfg.define("LLVM_LINK_LLVM_DYLIB", "ON");
+        }
+
         if target.contains("msvc") {
             cfg.define("LLVM_USE_CRT_DEBUG", "MT");
             cfg.define("LLVM_USE_CRT_RELEASE", "MT");