Skip to content

Commit 23e8aaf

Browse files
authored
Rollup merge of #60003 - petrhosek:llvm-lto-lld, r=cramertj
LLD is not supported on Darwin Don't enable LLD when LTO is enabled on Darwin.
2 parents 3049f05 + eb8e426 commit 23e8aaf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/bootstrap/native.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,10 @@ impl Step for Llvm {
156156
.define("LLVM_DEFAULT_TARGET_TRIPLE", target);
157157

158158
if builder.config.llvm_thin_lto && !emscripten {
159-
cfg.define("LLVM_ENABLE_LTO", "Thin")
160-
.define("LLVM_ENABLE_LLD", "ON");
159+
cfg.define("LLVM_ENABLE_LTO", "Thin");
160+
if !target.contains("apple") {
161+
cfg.define("LLVM_ENABLE_LLD", "ON");
162+
}
161163
}
162164

163165
// By default, LLVM will automatically find OCaml and, if it finds it,

0 commit comments

Comments
 (0)