Enable /GL for all targets in Official (behind a flag)

This is controlled by the full_wpo_on_official GYP/GN flag.

The plan is to use this flag to do an experiment on Dev.

I've done some local tests regarding the impact on the delta patches (I checked out 2 different revisions of Chrome and did 2 builds for each one, one WPO and one not), here's the numbers:

Normal 1 (non-WPO):
chrome.dll: 35274.5 KB
chrome_child.dll: 43636 KB

Normal 2 (non-WPO) :
chrome.dll: 35405 KB
chrome_child.dll: 43792 KB

WPO 1:
chrome.dll: 34944.5 KB (-330 KB)
chrome_child.dll: 44569 KB (+933 KB)

WPO 2:
chrome.dll: 35066 KB (-339 KB)
chrome_child.dll 44710.5 KB (+918.5 KB)

non-WPO 1 -> non-WPO 2:
patch: 6205.23 KB
patch.7z: 2765.42 KB

WPO 1 -> WPO 2:
patch: 6640.88 KB (+435.65 KB)
patch.7z: 2951.07 KB (+185.65 KB)

BUG=490934

Review-Url: https://codereview.chromium.org/1880113003
Cr-Original-Commit-Position: refs/heads/master@{#390779}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ea6b4cf8e486d9e8321030cde31024e7662130d5
diff --git a/BUILD.gn b/BUILD.gn
index b744cc4..fa4350c 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -27,6 +27,8 @@
 #   6) compile_gperf, compile_re2c, etc. -- Actions that invoke programs that
 #              turn intermediate files into .c files.
 
+import("//build/config/compiler/compiler.gni")
+
 if (current_toolchain == host_toolchain) {
   # Various files referenced by multiple targets.
   yasm_gen_include_dir = "$target_gen_dir/include"
@@ -297,6 +299,12 @@
       ":yasm_warnings",
     ]
 
+    # Disable WPO for yasm: crbug.com/604808
+    if (is_official_build && full_wpo_on_official) {
+      configs -= [ "//build/config/compiler:default_optimization" ]
+      configs += [ "//build/config/compiler:optimize_no_wpo" ]
+    }
+
     # Yasm generates a bunch of .c files which its source file #include.
     # Add the |target_gen_dir| into the include path so it can find them.
     # Ideally, these generated .c files would be placed into a separate