| 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/goma.gni") | 
| 9 import("//build/toolchain/toolchain.gni") | 10 import("//build/toolchain/toolchain.gni") | 
| 10 | 11 | 
| 11 declare_args() { | 12 declare_args() { | 
| 12   # How many symbols to include in the build. This affects the performance of | 13   # 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. | 14   # the build since the symbols are large and dealing with them is slow. | 
| 14   #   2 means regular build with symbols. | 15   #   2 means regular build with symbols. | 
| 15   #   1 means minimal symbols, usually enough for backtraces only. | 16   #   1 means minimal symbols, usually enough for backtraces only. | 
| 16   #   0 means no symbols. | 17   #   0 means no symbols. | 
| 17   #   -1 means auto-set according to debug/release and platform. | 18   #   -1 means auto-set according to debug/release and platform. | 
| 18   symbol_level = -1 | 19   symbol_level = -1 | 
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 75                               current_cpu == "arm"))) | 76                               current_cpu == "arm"))) | 
| 76 } | 77 } | 
| 77 | 78 | 
| 78 # If it wasn't manually set, set to an appropriate default. | 79 # If it wasn't manually set, set to an appropriate default. | 
| 79 assert(symbol_level >= -1 && symbol_level <= 2, "Invalid symbol_level") | 80 assert(symbol_level >= -1 && symbol_level <= 2, "Invalid symbol_level") | 
| 80 if (symbol_level == -1) { | 81 if (symbol_level == -1) { | 
| 81   if (is_android && use_order_profiling) { | 82   if (is_android && use_order_profiling) { | 
| 82     # With instrumentation enabled, debug info puts libchrome.so over 4gb, which | 83     # With instrumentation enabled, debug info puts libchrome.so over 4gb, which | 
| 83     # causes the linker to produce an invalid ELF. http://crbug.com/574476 | 84     # causes the linker to produce an invalid ELF. http://crbug.com/574476 | 
| 84     symbol_level = 0 | 85     symbol_level = 0 | 
|  | 86   } else if (is_win && use_goma && !is_clang) { | 
|  | 87     # goma doesn't support PDB files, so we disable symbols during goma | 
|  | 88     # compilation because otherwise the redundant debug information generated | 
|  | 89     # by visual studio (repeated in every .obj file) makes linker | 
|  | 90     # memory consumption and link times unsustainable (crbug.com/630074). | 
|  | 91     # Clang on windows does not have this issue. | 
|  | 92     symbol_level = 1 | 
| 85   } else if (!is_linux || is_debug || is_official_build || is_chromecast) { | 93   } else if (!is_linux || is_debug || is_official_build || is_chromecast) { | 
| 86     # Linux is slowed by having symbols as part of the target binary, whereas | 94     # Linux is slowed by having symbols as part of the target binary, whereas | 
| 87     # Mac and Windows have them separate, so in Release Linux, default them off, | 95     # Mac and Windows have them separate, so in Release Linux, default them off, | 
| 88     # but keep them on for Official builds and Chromecast builds. | 96     # but keep them on for Official builds and Chromecast builds. | 
| 89     symbol_level = 2 | 97     symbol_level = 2 | 
| 90   } else if (using_sanitizer) { | 98   } else if (using_sanitizer) { | 
| 91     # Sanitizers require symbols for filename suppressions to work. | 99     # Sanitizers require symbols for filename suppressions to work. | 
| 92     symbol_level = 1 | 100     symbol_level = 1 | 
| 93   } else { | 101   } else { | 
| 94     symbol_level = 0 | 102     symbol_level = 0 | 
| 95   } | 103   } | 
| 96 } | 104 } | 
| OLD | NEW | 
|---|