Author: Nico Weber Date: 2021-01-09T14:03:52-05:00 New Revision: 87d4ea2433663b4aabe9c979a4dd47ef6adedc8b
URL: https://github.com/llvm/llvm-project/commit/87d4ea2433663b4aabe9c979a4dd47ef6adedc8b DIFF: https://github.com/llvm/llvm-project/commit/87d4ea2433663b4aabe9c979a4dd47ef6adedc8b.diff LOG: [gn build] Make an explicit `use_lld = true` on mac use lld.darwinnew use_lld defaults to true on non-mac if clang_base_path is set (i.e. the host compiler is a locally-built clang). On mac, the lld Mach-O port used to be unusable, but ld64.lld.darwinnew is close to usable. When explicitly setting `use_lld = true` in a GN build on a mac host, check-lld passes, two check-clang tests fail, and a handful check-llvm tests fail (the latter all due to -flat_namespace not yet being implemented). Added: Modified: llvm/utils/gn/build/BUILD.gn Removed: ################################################################################ diff --git a/llvm/utils/gn/build/BUILD.gn b/llvm/utils/gn/build/BUILD.gn index 92d667c16f70..813f39ddb623 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) { _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits