OLD | NEW |
---|---|
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") | 9 import("//build/toolchain/toolchain.gni") |
10 | 10 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
75 current_cpu == "arm"))) | 75 current_cpu == "arm"))) |
76 } | 76 } |
77 | 77 |
78 # If it wasn't manually set, set to an appropriate default. | 78 # If it wasn't manually set, set to an appropriate default. |
79 assert(symbol_level >= -1 && symbol_level <= 2, "Invalid symbol_level") | 79 assert(symbol_level >= -1 && symbol_level <= 2, "Invalid symbol_level") |
80 if (symbol_level == -1) { | 80 if (symbol_level == -1) { |
81 if (is_android && use_order_profiling) { | 81 if (is_android && use_order_profiling) { |
82 # With instrumentation enabled, debug info puts libchrome.so over 4gb, which | 82 # With instrumentation enabled, debug info puts libchrome.so over 4gb, which |
83 # causes the linker to produce an invalid ELF. http://crbug.com/574476 | 83 # causes the linker to produce an invalid ELF. http://crbug.com/574476 |
84 symbol_level = 0 | 84 symbol_level = 0 |
85 } else if (is_win && use_goma) { | |
86 # goma doesn't support PDB files, so we disable symbols during goma | |
87 # compilation because otherwise the redundant debug information | |
Nico
2016/08/03 23:42:16
Don't we want this for non win too?
Dirk Pranke
2016/08/03 23:54:36
I'm not sure what you're asking.
goma + full symb
| |
88 # (repeated in every .obj file) makes linker memory consumption and | |
89 # link times unsustainable (crbug.com/630074). | |
90 symbol_level = 1 | |
85 } else if (is_win && is_clang && !using_sanitizer) { | 91 } else if (is_win && is_clang && !using_sanitizer) { |
86 # TODO(thakis): Remove this again once building with clang/win and | 92 # TODO(thakis): Remove this again once building with clang/win and |
87 # debug info doesn't make link.exe run for hours. | 93 # debug info doesn't make link.exe run for hours. |
88 symbol_level = 1 | 94 symbol_level = 1 |
89 } else if (!is_linux || is_debug || is_official_build || is_chromecast) { | 95 } else if (!is_linux || is_debug || is_official_build || is_chromecast) { |
90 # Linux is slowed by having symbols as part of the target binary, whereas | 96 # Linux is slowed by having symbols as part of the target binary, whereas |
91 # Mac and Windows have them separate, so in Release Linux, default them off, | 97 # Mac and Windows have them separate, so in Release Linux, default them off, |
92 # but keep them on for Official builds and Chromecast builds. | 98 # but keep them on for Official builds and Chromecast builds. |
93 symbol_level = 2 | 99 symbol_level = 2 |
94 } else if (using_sanitizer) { | 100 } else if (using_sanitizer) { |
95 # Sanitizers require symbols for filename suppressions to work. | 101 # Sanitizers require symbols for filename suppressions to work. |
96 symbol_level = 1 | 102 symbol_level = 1 |
97 } else { | 103 } else { |
98 symbol_level = 0 | 104 symbol_level = 0 |
99 } | 105 } |
100 } | 106 } |
OLD | NEW |