]> granicus.if.org Git - llvm/commitdiff
gn build: Port r342002
authorNico Weber <nicolasweber@gmx.de>
Thu, 7 Mar 2019 15:44:59 +0000 (15:44 +0000)
committerNico Weber <nicolasweber@gmx.de>
Thu, 7 Mar 2019 15:44:59 +0000 (15:44 +0000)
I had hoped we could remove the dependency on shell32.lib from lib/Support
(there isn't much depending on it), but looks like this will take a while. So
for now, port this over.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355604 91177308-0d34-0410-b5e6-96231b3b80d8

utils/gn/secondary/llvm/lib/Support/BUILD.gn

index 1c20930681eb269425e4dd39a8b9b189c5026201..0e5e89b08e29ce0c27b45f593b9ff935a705cc87 100644 (file)
@@ -159,5 +159,12 @@ static_library("Support") {
 
   if (current_os == "linux" || current_os == "android") {
     libs += [ "dl" ]
+  } else if (current_os == "win") {
+    # Delay load shell32.dll if possible to speed up process startup.
+    libs += [ "delayimp.lib" ]
+    ldflags = [
+      "-delayload:ole32.dll",
+      "-delayload:shell32.dll",
+    ]
   }
 }