From 23c32766e53091f7f4eae988a0b6ee4676ba1db2 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 14 Sep 2020 10:20:31 -0700 Subject: [PATCH] fix: Ensure electron delay loads the same modules as chromium (#25436) * 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. * fix: Ensure win modules are properly delayloaded * chore: fix linting Co-authored-by: Chris Davis Co-authored-by: Samuel Attard --- BUILD.gn | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index cee6e59ea792e..a5667eed923fc 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1138,20 +1138,17 @@ if (is_mac) { "//components/crash/core/app:run_as_crashpad_handler", ] + ldflags = [] + libs = [ "comctl32.lib", "uiautomationcore.lib", "wtsapi32.lib", ] - configs += [ "//build/config/win:windowed" ] - - 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") {