OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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/compiler/compiler.gni") | 7 import("//build/config/compiler/compiler.gni") |
8 import("//build/config/nacl/config.gni") | 8 import("//build/config/nacl/config.gni") |
9 import("//build/toolchain/cc_wrapper.gni") | 9 import("//build/toolchain/cc_wrapper.gni") |
10 | 10 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 if (is_win) { | 68 if (is_win) { |
69 # Whether the VS xtree header has been patched to disable warning 4702. If | 69 # Whether the VS xtree header has been patched to disable warning 4702. If |
70 # it has, then we don't need to disable 4702 (unreachable code warning). | 70 # it has, then we don't need to disable 4702 (unreachable code warning). |
71 # The patch is preapplied to the internal toolchain and hence all bots. | 71 # The patch is preapplied to the internal toolchain and hence all bots. |
72 msvs_xtree_patched = false | 72 msvs_xtree_patched = false |
73 } | 73 } |
74 | 74 |
75 # Omit unwind support in official builds to save space. | 75 # Omit unwind support in official builds to save space. |
76 # We can use breakpad for these builds. | 76 # We can use breakpad for these builds. |
77 exclude_unwind_tables = is_chrome_branded && is_official_build | 77 exclude_unwind_tables = is_chrome_branded && is_official_build |
| 78 |
| 79 # If true, gold linker will save symbol table inside object files. |
| 80 # This speeds up gdb startup by 60% |
| 81 gdb_index = false |
78 } | 82 } |
79 | 83 |
80 # Apply the default logic for these values if they were not set explicitly. | 84 # Apply the default logic for these values if they were not set explicitly. |
81 if (gold_path == false) { | 85 if (gold_path == false) { |
82 if (use_gold) { | 86 if (use_gold) { |
83 gold_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin", | 87 gold_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin", |
84 root_build_dir) | 88 root_build_dir) |
85 } else { | 89 } else { |
86 gold_path = "" | 90 gold_path = "" |
87 } | 91 } |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 # saved ~20% of link time. | 284 # saved ~20% of link time. |
281 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_threa
d/thread/281527606915bb36 | 285 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_threa
d/thread/281527606915bb36 |
282 # Only apply this to the target linker, since the host | 286 # Only apply this to the target linker, since the host |
283 # linker might not be gold, but isn't used much anyway. | 287 # linker might not be gold, but isn't used much anyway. |
284 # TODO(raymes): Disable threading because gold is frequently | 288 # TODO(raymes): Disable threading because gold is frequently |
285 # crashing on the bots: crbug.com/161942. | 289 # crashing on the bots: crbug.com/161942. |
286 #"-Wl,--threads", | 290 #"-Wl,--threads", |
287 #"-Wl,--thread-count=4", | 291 #"-Wl,--thread-count=4", |
288 ] | 292 ] |
289 | 293 |
| 294 if (gdb_index) { |
| 295 ldflags += [ "-Wl,--gdb-index" ] |
| 296 } |
| 297 |
290 if (!using_sanitizer && !(is_android && use_order_profiling)) { | 298 if (!using_sanitizer && !(is_android && use_order_profiling)) { |
291 # TODO(brettw) common.gypi has this only for target toolset. | 299 # TODO(brettw) common.gypi has this only for target toolset. |
292 ldflags += [ "-Wl,--icf=all" ] | 300 ldflags += [ "-Wl,--icf=all" ] |
293 } | 301 } |
294 | 302 |
295 # TODO(thestig): Make this flag work with GN. | 303 # TODO(thestig): Make this flag work with GN. |
296 #if (!is_official_build && !is_chromeos && !(is_asan || is_lsan || is_tsan |
| is_msan)) { | 304 #if (!is_official_build && !is_chromeos && !(is_asan || is_lsan || is_tsan |
| is_msan)) { |
297 # ldflags += [ | 305 # ldflags += [ |
298 # "-Wl,--detect-odr-violations", | 306 # "-Wl,--detect-odr-violations", |
299 # ] | 307 # ] |
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1338 | 1346 |
1339 if (is_ios || is_mac) { | 1347 if (is_ios || is_mac) { |
1340 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1348 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
1341 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1349 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
1342 config("enable_arc") { | 1350 config("enable_arc") { |
1343 common_flags = [ "-fobjc-arc" ] | 1351 common_flags = [ "-fobjc-arc" ] |
1344 cflags_objc = common_flags | 1352 cflags_objc = common_flags |
1345 cflags_objcc = common_flags | 1353 cflags_objcc = common_flags |
1346 } | 1354 } |
1347 } | 1355 } |
OLD | NEW |