From be1e50be0cd67a74b41a173aa55aa50d0fb721fc Mon Sep 17 00:00:00 2001 From: Chris Davis Date: Fri, 11 Sep 2020 11:04:59 -0700 Subject: [PATCH 1/3] Ensure electron delay loads the appropriate modules as chromium on windows This change adds the same module delay load list that chromium uses for electron. Some modules were already getting delay loaded from other build files in chromium but not the main list via //build/config/win:delayloads. We do not include the list of delay loads in delayloads_not_for_child_dll as those have issues being loaded in sandboxes processes. This will reduce the overall reference set impact of the electron processes. --- BUILD.gn | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index cee6e59ea792e..6a6ffec110d69 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1144,14 +1144,11 @@ if (is_mac) { "wtsapi32.lib", ] - configs += [ "//build/config/win:windowed" ] + ldflags = [] - ldflags = [ - # Windows 7 doesn't have these DLLs. - # TODO: are there other DLLs we need to list here to be win7 - # compatible? - "/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll", - "/DELAYLOAD:api-ms-win-core-winrt-string-l1-1-0.dll", + configs += [ + "//build/config/win:windowed", + "//build/config/win:delayloads", ] if (target_cpu == "arm64") { From a90cb406630f77c0573f09eb06af2eb4652354a7 Mon Sep 17 00:00:00 2001 From: Chris Davis Date: Fri, 11 Sep 2020 11:22:52 -0700 Subject: [PATCH 2/3] fix: Ensure win modules are properly delayloaded --- BUILD.gn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 6a6ffec110d69..8f90b0563c778 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1138,14 +1138,14 @@ if (is_mac) { "//components/crash/core/app:run_as_crashpad_handler", ] + ldflags = [] + libs = [ "comctl32.lib", "uiautomationcore.lib", "wtsapi32.lib", ] - ldflags = [] - configs += [ "//build/config/win:windowed", "//build/config/win:delayloads", From b95daf5aa8cf0462db2e3067e9feedb818595bf5 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Fri, 11 Sep 2020 11:31:39 -0700 Subject: [PATCH 3/3] chore: fix linting --- BUILD.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILD.gn b/BUILD.gn index 8f90b0563c778..a5667eed923fc 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1139,7 +1139,7 @@ if (is_mac) { ] ldflags = [] - + libs = [ "comctl32.lib", "uiautomationcore.lib",