[gn] Use ghash if using clang & LLD together to make PDBs
authorReid Kleckner <rnk@google.com>
Fri, 6 Mar 2020 22:41:48 +0000 (14:41 -0800)
committerReid Kleckner <rnk@google.com>
Mon, 9 Mar 2020 22:23:54 +0000 (15:23 -0700)
I noticed my links were a bit slower on Windows than usual.

Reviewed By: thakis

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

llvm/utils/gn/build/BUILD.gn

index 31d3ac5..a1a4b06 100644 (file)
@@ -64,6 +64,12 @@ config("compiler_defaults") {
         "/FS",
       ]
       ldflags += [ "/DEBUG" ]
+
+      # Speed up links with ghash on windows.
+      if (use_lld && is_clang) {
+        cflags += [ "-gcodeview-ghash" ]
+        ldflags += [ "/DEBUG:GHASH" ]
+      }
     }
     if (is_optimized) {
       cflags += [