| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |