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/compiler/pgo/pgo.gni") | 8 import("//build/config/compiler/pgo/pgo.gni") |
9 import("//build/config/sanitizers/sanitizers.gni") | 9 import("//build/config/sanitizers/sanitizers.gni") |
10 import("//build/toolchain/goma.gni") | 10 import("//build/toolchain/goma.gni") |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 !(android_64bit_target_cpu && !build_apk_secondary_abi)) { | 91 !(android_64bit_target_cpu && !build_apk_secondary_abi)) { |
92 # Reduce symbol level when it will cause invalid elf files to be created | 92 # Reduce symbol level when it will cause invalid elf files to be created |
93 # (due to file size). https://crbug.com/648948. | 93 # (due to file size). https://crbug.com/648948. |
94 symbol_level = 1 | 94 symbol_level = 1 |
95 } else if (is_win && use_goma && !is_clang) { | 95 } else if (is_win && use_goma && !is_clang) { |
96 # goma doesn't support PDB files, so we disable symbols during goma | 96 # goma doesn't support PDB files, so we disable symbols during goma |
97 # compilation because otherwise the redundant debug information generated | 97 # compilation because otherwise the redundant debug information generated |
98 # by visual studio (repeated in every .obj file) makes linker | 98 # by visual studio (repeated in every .obj file) makes linker |
99 # memory consumption and link times unsustainable (crbug.com/630074). | 99 # memory consumption and link times unsustainable (crbug.com/630074). |
100 # Clang on windows does not have this issue. | 100 # Clang on windows does not have this issue. |
| 101 # If you use is_win_fastlink = true then you can set symbol_level = 2 when |
| 102 # using goma. |
101 symbol_level = 1 | 103 symbol_level = 1 |
102 } else if ((!is_nacl && !is_linux) || is_debug || is_official_build || | 104 } else if ((!is_nacl && !is_linux) || is_debug || is_official_build || |
103 is_chromecast) { | 105 is_chromecast) { |
104 # Linux builds slower by having symbols as part of the target binary, | 106 # Linux builds slower by having symbols as part of the target binary, |
105 # whereas Mac and Windows have them separate, so in Release Linux, default | 107 # whereas Mac and Windows have them separate, so in Release Linux, default |
106 # them off, but keep them on for Official builds and Chromecast builds. | 108 # them off, but keep them on for Official builds and Chromecast builds. |
107 symbol_level = 2 | 109 symbol_level = 2 |
108 } else if (using_sanitizer) { | 110 } else if (using_sanitizer) { |
109 # Sanitizers require symbols for filename suppressions to work. | 111 # Sanitizers require symbols for filename suppressions to work. |
110 symbol_level = 1 | 112 symbol_level = 1 |
111 } else { | 113 } else { |
112 symbol_level = 0 | 114 symbol_level = 0 |
113 } | 115 } |
| 116 } else if (symbol_level == 2) { |
| 117 if (is_win) { |
| 118 # See crbug.com/630074 |
| 119 assert(is_win_fastlink || !use_goma, |
| 120 "Goma builds that use symbol_level 2 must use is_win_fastlink.") |
| 121 } |
114 } | 122 } |
115 | 123 |
116 # Assert that the configuration isn't going to hit https://crbug.com/648948. | 124 # Assert that the configuration isn't going to hit https://crbug.com/648948. |
117 assert(ignore_elf32_limitations || !is_android || | 125 assert(ignore_elf32_limitations || !is_android || |
118 (android_64bit_target_cpu && !build_apk_secondary_abi) || | 126 (android_64bit_target_cpu && !build_apk_secondary_abi) || |
119 is_component_build || symbol_level < 2, | 127 is_component_build || symbol_level < 2, |
120 "Android 32-bit non-component builds cannot have symbol_level=2 " + | 128 "Android 32-bit non-component builds cannot have symbol_level=2 " + |
121 "due to 4GiB file size limit, see https://crbug.com/648948. " + | 129 "due to 4GiB file size limit, see https://crbug.com/648948. " + |
122 "If you really want to try this out, " + | 130 "If you really want to try this out, " + |
123 "set ignore_elf32_limitations=true.") | 131 "set ignore_elf32_limitations=true.") |
OLD | NEW |