From eb8e4265abdf21ab76a8e33e372efe41a5204fb4 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Mon, 15 Apr 2019 16:38:36 -0700 Subject: [PATCH] LLD is not supported on Darwin Don't enable LLD when LTO is enabled on Darwin. --- src/bootstrap/native.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs index fde40b0d1b407..96aed7293450c 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,