Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(745)

Side by Side Diff: chrome/BUILD.gn

Issue 1938133002: Enable full WPO for the PGO builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix + GN things. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/config/compiler/compiler.gni ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/buildflag_header.gni") 5 import("//build/buildflag_header.gni")
6 import("//build/config/chrome_build.gni") 6 import("//build/config/chrome_build.gni")
7 import("//build/config/compiler/compiler.gni") 7 import("//build/config/compiler/compiler.gni")
8 import("//build/config/features.gni") 8 import("//build/config/features.gni")
9 import("//build/config/locales.gni") 9 import("//build/config/locales.gni")
10 import("//build/config/sanitizers/sanitizers.gni") 10 import("//build/config/sanitizers/sanitizers.gni")
11 import("//build/config/ui.gni") 11 import("//build/config/ui.gni")
12 import("//build/config/win/console_app.gni") 12 import("//build/config/win/console_app.gni")
13 import("//build/config/win/manifest.gni") 13 import("//build/config/win/manifest.gni")
14 import("//chrome/chrome_repack_locales.gni") 14 import("//chrome/chrome_repack_locales.gni")
15 import("//chrome/common/features.gni") 15 import("//chrome/common/features.gni")
16 import("//chrome/version.gni") 16 import("//chrome/version.gni")
17 import("//ui/base/ui_features.gni") 17 import("//ui/base/ui_features.gni")
18 18
19 declare_args() {
20 # Specify the current PGO phase, only used for the Windows MSVS build. Here's
21 # the different values that can be used:
22 # 0 : Means that PGO is turned off.
23 # 1 : Used during the PGI (instrumentation) phase.
24 # 2 : Used during the PGO (optimization) phase.
25 #
26 # TODO(sebmarchand): Add support for the PGU (update) phase.
27 chrome_pgo_phase = 0
28 }
29
30 if (is_android) { 19 if (is_android) {
31 import("//build/config/android/rules.gni") 20 import("//build/config/android/rules.gni")
32 } 21 }
33 22
34 if (is_win) { 23 if (is_win) {
35 action("reorder_imports") { 24 action("reorder_imports") {
36 script = "//build/win/reorder-imports.py" 25 script = "//build/win/reorder-imports.py"
37 26
38 # See comment in chrome_dll.gypi in the hardlink_to_output 27 # See comment in chrome_dll.gypi in the hardlink_to_output
39 # target for why this cannot be 'initial' like the DLL. 28 # target for why this cannot be 'initial' like the DLL.
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 ] 400 ]
412 401
413 if (is_win) { 402 if (is_win) {
414 if (symbol_level == 2) { 403 if (symbol_level == 2) {
415 # Incremental linking doesn't work on this target in debug mode with 404 # Incremental linking doesn't work on this target in debug mode with
416 # full symbols, but does work in other cases, including minimal 405 # full symbols, but does work in other cases, including minimal
417 # symbols. 406 # symbols.
418 configs -= [ "//build/config/win:default_incremental_linking" ] 407 configs -= [ "//build/config/win:default_incremental_linking" ]
419 configs += [ "//build/config/win:no_incremental_linking" ] 408 configs += [ "//build/config/win:no_incremental_linking" ]
420 } 409 }
421 if (chrome_pgo_phase > 0) {
422 cflags += [
423 "/GL", # Whole program optimization.
424
425 # Disable Warning 4702 ("Unreachable code") for the WPO/PGO builds.
426 # Probably anything that this would catch that wouldn't be caught in
427 # a normal build isn't going to actually be a bug, so the
428 # incremental value of C4702 for PGO builds is likely very small.
429 "/wd4702",
430 ]
431 }
432 if (chrome_pgo_phase == 1) { 410 if (chrome_pgo_phase == 1) {
433 ldflags = [ 411 ldflags = [
434 "/LTCG:PGINSTRUMENT", 412 "/LTCG:PGINSTRUMENT",
435 "/PogoSafeMode", 413 "/PogoSafeMode",
436 ] 414 ]
437 } else if (chrome_pgo_phase == 2) { 415 } else if (chrome_pgo_phase == 2) {
438 ldflags = [ "/LTCG:PGOPTIMIZE" ] 416 ldflags = [ "/LTCG:PGOPTIMIZE" ]
439 } 417 }
440 } 418 }
441 419
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
1091 "//chrome/app/theme/$branding_path_component/product_logo_48.png", 1069 "//chrome/app/theme/$branding_path_component/product_logo_48.png",
1092 "//chrome/tools/build/linux/chrome-wrapper", 1070 "//chrome/tools/build/linux/chrome-wrapper",
1093 "//third_party/xdg-utils/scripts/xdg-mime", 1071 "//third_party/xdg-utils/scripts/xdg-mime",
1094 "//third_party/xdg-utils/scripts/xdg-settings", 1072 "//third_party/xdg-utils/scripts/xdg-settings",
1095 ] 1073 ]
1096 outputs = [ 1074 outputs = [
1097 "$root_out_dir/{{source_file_part}}", 1075 "$root_out_dir/{{source_file_part}}",
1098 ] 1076 ]
1099 } 1077 }
1100 } 1078 }
OLDNEW
« no previous file with comments | « build/config/compiler/compiler.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698