[go: nahoru, domu]

[BrowserSwitcher] Build BHO for both bitnesses

This is a reland of this change, with a fix for symbol_level=0:
https://chromium-review.googlesource.com/c/chromium/src/+/1589457

To do so, this CL also adds support for the x86 toolchain in an x64
build.

Instead of generating one DLL, we now generate 2 DLLs in the root
out-dir:

- browser_switcher_bho.dll (x86)
- browser_switcher_bho_64.dll (x64)

The one that is cross-built (i.e. bitness doesn't match the host) is
built in a sub-directory, and then copied to the root out-dir.

Bug: 952897
Change-Id: Ie18544fb97ba3091bc8113932e634c539d6d7502
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1653660
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Nicolas Ouellet-Payeur <nicolaso@chromium.org>
Cr-Commit-Position: refs/heads/master@{#668482}
diff --git a/BUILD.gn b/BUILD.gn
index 2adee9d2..653e1d24 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -278,6 +278,10 @@
     ]
   }
 
+  if (is_win && (target_cpu == "x86" || target_cpu == "x64")) {
+    deps += [ "//chrome/browser/browser_switcher/bho:browser_switcher_dlls" ]
+  }
+
   if (is_win || is_linux) {
     deps += [
       "//tools/traffic_annotation/auditor:traffic_annotation_auditor",
@@ -586,7 +590,6 @@
   if (is_win) {
     deps += [
       "//base:pe_image_test",
-      "//chrome/browser/browser_switcher/bho:browser_switcher_bho",
       "//chrome/chrome_cleaner:chrome_cleaner_unittests",
       "//chrome/chrome_elf:chrome_elf_unittests",
       "//chrome/chrome_elf:dll_hash_main",