diff --git a/llvm/utils/gn/build/BUILD.gn b/llvm/utils/gn/build/BUILD.gn index 92d667c16f70e1..813f39ddb623ff 100644 --- a/llvm/utils/gn/build/BUILD.gn +++ b/llvm/utils/gn/build/BUILD.gn @@ -236,7 +236,11 @@ config("compiler_defaults") { # On Windows, the linker is not invoked through the compiler driver. if (use_lld && host_os != "win") { - ldflags += [ "-fuse-ld=lld" ] + if (host_os == "mac") { + ldflags += [ "-fuse-ld=lld.darwinnew" ] + } else { + ldflags += [ "-fuse-ld=lld" ] + } } if (llvm_build_instrumented_coverage) {