[bazel] Use lld in --config=generic_clang
authorArthur Eubanks <aeubanks@google.com>
Thu, 11 Aug 2022 21:15:47 +0000 (14:15 -0700)
committerArthur Eubanks <aeubanks@google.com>
Fri, 12 Aug 2022 18:45:28 +0000 (11:45 -0700)
This should give us faster links.

Differential Revision: https://reviews.llvm.org/D131723

utils/bazel/.bazelrc

index 48d83b2..f1d09cc 100644 (file)
@@ -45,6 +45,10 @@ build:generic_clang --cxxopt=-Wno-range-loop-analysis --host_cxxopt=-Wno-range-l
 # not the point of the Bazel build to catch usage of deprecated APIs.
 build:generic_clang --copt=-Wno-deprecated --host_copt=-Wno-deprecated
 
+# lld links faster than other linkers. Assume that anybody using clang also has
+# lld available.
+build:generic_clang --linkopt=-fuse-ld=lld --host_linkopt=-fuse-ld=lld
+
 ###############################################################################
 # Options for "generic_gcc" builds: these options should generally apply to
 # builds using a GCC-based compiler, and default to the `gcc` executable on