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

Side by Side Diff: build/config/compiler/compiler.gni

Issue 1979043002: Revert of 👻 Merge android's use_gold settings with the main use_gold GN arg logic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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/BUILD.gn ('k') | build/config/gcc/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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/config/android/config.gni") 5 import("//build/config/android/config.gni")
6 import("//build/config/chrome_build.gni") 6 import("//build/config/chrome_build.gni")
7 import("//build/config/chromecast_build.gni") 7 import("//build/config/chromecast_build.gni")
8 import("//build/config/sanitizers/sanitizers.gni") 8 import("//build/config/sanitizers/sanitizers.gni")
9 import("//build/toolchain/toolchain.gni")
10 9
11 declare_args() { 10 declare_args() {
12 # How many symbols to include in the build. This affects the performance of 11 # How many symbols to include in the build. This affects the performance of
13 # the build since the symbols are large and dealing with them is slow. 12 # the build since the symbols are large and dealing with them is slow.
14 # 2 means regular build with symbols. 13 # 2 means regular build with symbols.
15 # 1 means minimal symbols, usually enough for backtraces only. 14 # 1 means minimal symbols, usually enough for backtraces only.
16 # 0 means no symbols. 15 # 0 means no symbols.
17 # -1 means auto-set according to debug/release and platform. 16 # -1 means auto-set according to debug/release and platform.
18 symbol_level = -1 17 symbol_level = -1
19 18
20 # Compile in such a way as to enable profiling of the generated code. For 19 # Compile in such a way as to enable profiling of the generated code. For
21 # example, don't omit the frame pointer and leave in symbols. 20 # example, don't omit the frame pointer and leave in symbols.
22 enable_profiling = false 21 enable_profiling = false
23 22
24 # Specify the current PGO phase, only used for the Windows MSVS build. Here's 23 # Specify the current PGO phase, only used for the Windows MSVS build. Here's
25 # the different values that can be used: 24 # the different values that can be used:
26 # 0 : Means that PGO is turned off. 25 # 0 : Means that PGO is turned off.
27 # 1 : Used during the PGI (instrumentation) phase. 26 # 1 : Used during the PGI (instrumentation) phase.
28 # 2 : Used during the PGO (optimization) phase. 27 # 2 : Used during the PGO (optimization) phase.
29 # 28 #
30 # TODO(sebmarchand): Add support for the PGU (update) phase. 29 # TODO(sebmarchand): Add support for the PGU (update) phase.
31 chrome_pgo_phase = 0 30 chrome_pgo_phase = 0
32 31
33 # Whether or not the official builds should be build with full WPO. 32 # Whether or not the official builds should be build with full WPO.
34 full_wpo_on_official = false 33 full_wpo_on_official = false
35 } 34 }
36 35
37 declare_args() {
38 use_gold = !use_lld &&
39 ((is_linux && (current_cpu == "x64" || current_cpu == "x86" ||
40 current_cpu == "arm")) ||
41 (is_android && (current_cpu == "x86" || current_cpu == "x64" ||
42 current_cpu == "arm")))
43 }
44
45 # If it wasn't manually set, set to an appropriate default. 36 # If it wasn't manually set, set to an appropriate default.
46 assert(symbol_level >= -1 && symbol_level <= 2, "Invalid symbol_level") 37 assert(symbol_level >= -1 && symbol_level <= 2, "Invalid symbol_level")
47 if (symbol_level == -1) { 38 if (symbol_level == -1) {
48 if (is_android && use_order_profiling) { 39 if (is_android && use_order_profiling) {
49 # With instrumentation enabled, debug info puts libchrome.so over 4gb, which 40 # With instrumentation enabled, debug info puts libchrome.so over 4gb, which
50 # causes the linker to produce an invalid ELF. http://crbug.com/574476 41 # causes the linker to produce an invalid ELF. http://crbug.com/574476
51 symbol_level = 0 42 symbol_level = 0
52 } else if (is_win && is_clang && !using_sanitizer) { 43 } else if (is_win && is_clang && !using_sanitizer) {
53 # TODO(thakis): Remove this again once building with clang/win and 44 # TODO(thakis): Remove this again once building with clang/win and
54 # debug info doesn't make link.exe run for hours. 45 # debug info doesn't make link.exe run for hours.
55 symbol_level = 1 46 symbol_level = 1
56 } else if (!is_linux || is_debug || is_official_build || is_chromecast) { 47 } else if (!is_linux || is_debug || is_official_build || is_chromecast) {
57 # Linux is slowed by having symbols as part of the target binary, whereas 48 # Linux is slowed by having symbols as part of the target binary, whereas
58 # Mac and Windows have them separate, so in Release Linux, default them off, 49 # Mac and Windows have them separate, so in Release Linux, default them off,
59 # but keep them on for Official builds and Chromecast builds. 50 # but keep them on for Official builds and Chromecast builds.
60 symbol_level = 2 51 symbol_level = 2
61 } else if (using_sanitizer) { 52 } else if (using_sanitizer) {
62 # Sanitizers require symbols for filename suppressions to work. 53 # Sanitizers require symbols for filename suppressions to work.
63 symbol_level = 1 54 symbol_level = 1
64 } else { 55 } else {
65 symbol_level = 0 56 symbol_level = 0
66 } 57 }
67 } 58 }
68 59
69 # PGO requires full WPO. 60 # PGO requires full WPO.
70 if (chrome_pgo_phase > 0) { 61 if (chrome_pgo_phase > 0) {
71 full_wpo_on_official = true 62 full_wpo_on_official = true
72 } 63 }
OLDNEW
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | build/config/gcc/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698