about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPetr Hosek <phosek@google.com>2019-04-15 16:38:36 -0700
committerPetr Hosek <phosek@google.com>2019-04-15 16:38:36 -0700
commiteb8e4265abdf21ab76a8e33e372efe41a5204fb4 (patch)
tree56dd598716e5c835dd36127b76cc68c43789c6ab
parent2975a3c4befa8ad610da2e3c5f5de351d6d70a2b (diff)
downloadrust-eb8e4265abdf21ab76a8e33e372efe41a5204fb4.tar.gz
rust-eb8e4265abdf21ab76a8e33e372efe41a5204fb4.zip
LLD is not supported on Darwin
Don't enable LLD when LTO is enabled on Darwin.
-rw-r--r--src/bootstrap/native.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs
index fde40b0d1b4..96aed729345 100644
--- a/src/bootstrap/native.rs
+++ b/src/bootstrap/native.rs
@@ -156,8 +156,10 @@ impl Step for Llvm {
            .define("LLVM_DEFAULT_TARGET_TRIPLE", target);
 
         if builder.config.llvm_thin_lto && !emscripten {
-            cfg.define("LLVM_ENABLE_LTO", "Thin")
-               .define("LLVM_ENABLE_LLD", "ON");
+            cfg.define("LLVM_ENABLE_LTO", "Thin");
+            if !target.contains("apple") {
+               cfg.define("LLVM_ENABLE_LLD", "ON");
+            }
         }
 
         // By default, LLVM will automatically find OCaml and, if it finds it,