From a92711404ccae970ed4e23e1d8e1d1ee88cd2458 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Thu, 7 Mar 2019 15:44:59 +0000 Subject: [PATCH] gn build: Port r342002 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 llvm-svn: 355604 --- llvm/utils/gn/secondary/llvm/lib/Support/BUILD.gn | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/llvm/utils/gn/secondary/llvm/lib/Support/BUILD.gn b/llvm/utils/gn/secondary/llvm/lib/Support/BUILD.gn index 1c20930681eb2..0e5e89b08e29c 100644 --- a/llvm/utils/gn/secondary/llvm/lib/Support/BUILD.gn +++ b/llvm/utils/gn/secondary/llvm/lib/Support/BUILD.gn @@ -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", + ] } }