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

Side by Side Diff: build/config/compiler/BUILD.gn

Issue 1951133002: Use gold and the bundled binutils on x86 by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix more typos 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
« build/common.gypi ('K') | « build/common.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 import("//build/toolchain/toolchain.gni") 10 import("//build/toolchain/toolchain.gni")
(...skipping 27 matching lines...) Expand all
38 binutils_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin", 38 binutils_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin",
39 root_build_dir) 39 root_build_dir)
40 40
41 # Compile in such a way as to make it possible for the profiler to unwind full 41 # Compile in such a way as to make it possible for the profiler to unwind full
42 # stack frames. Setting this flag has a large effect on the performance of the 42 # stack frames. Setting this flag has a large effect on the performance of the
43 # generated code than just setting profiling, but gives the profiler more 43 # generated code than just setting profiling, but gives the profiler more
44 # information to analyze. 44 # information to analyze.
45 # Requires profiling to be set to true. 45 # Requires profiling to be set to true.
46 enable_full_stack_frames_for_profiling = false 46 enable_full_stack_frames_for_profiling = false
47 47
48 # TODO(GYP): We should be using 64-bit gold for linking on both 64-bit Linux 48 use_gold = is_linux && (current_cpu == "x64" || current_cpu == "x86" ||
49 # and 32-bit linux; 32-bit Gold runs out of address-space on 32-bit builds. 49 current_cpu == "arm") && !use_lld
50 # However, something isn't quite working right on the 32-bit builds.
51 use_gold =
52 is_linux && (current_cpu == "x64" || current_cpu == "arm") && !use_lld
53 50
54 # When we are going to use gold we need to find it. 51 # When we are going to use gold we need to find it.
55 # This is initialized below, after use_gold might have been overridden. 52 # This is initialized below, after use_gold might have been overridden.
56 gold_path = false 53 gold_path = false
57 54
58 # use_debug_fission: whether to use split DWARF debug info 55 # use_debug_fission: whether to use split DWARF debug info
59 # files. This can reduce link time significantly, but is incompatible 56 # files. This can reduce link time significantly, but is incompatible
60 # with some utilities such as icecc and ccache. Requires gold and 57 # with some utilities such as icecc and ccache. Requires gold and
61 # gcc >= 4.8 or clang. 58 # gcc >= 4.8 or clang.
62 # http://gcc.gnu.org/wiki/DebugFission 59 # http://gcc.gnu.org/wiki/DebugFission
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 # ldflags += [ 326 # ldflags += [
330 # "-Wl,--detect-odr-violations", 327 # "-Wl,--detect-odr-violations",
331 # ] 328 # ]
332 #} 329 #}
333 } else if (linux_use_bundled_binutils) { 330 } else if (linux_use_bundled_binutils) {
334 # Gold is the default linker for the bundled binutils so we explicitly 331 # Gold is the default linker for the bundled binutils so we explicitly
335 # enable the bfd linker when use_gold is not set. 332 # enable the bfd linker when use_gold is not set.
336 ldflags += [ "-fuse-ld=bfd" ] 333 ldflags += [ "-fuse-ld=bfd" ]
337 } 334 }
338 335
339 if (is_posix && (use_gold || (use_lld && !is_nacl)) && !using_sanitizer && 336 if (is_posix &&
340 !(is_android && use_order_profiling)) { 337 ((use_gold && current_cpu != "x86") || (use_lld && !is_nacl)) &&
338 !using_sanitizer && !(is_android && use_order_profiling)) {
341 ldflags += [ "-Wl,--icf=all" ] 339 ldflags += [ "-Wl,--icf=all" ]
342 } 340 }
343 341
344 if (linux_use_bundled_binutils) { 342 if (linux_use_bundled_binutils) {
345 cflags += [ "-B$binutils_path" ] 343 cflags += [ "-B$binutils_path" ]
346 } 344 }
347 345
348 # Clang-specific compiler flags setup. 346 # Clang-specific compiler flags setup.
349 # ------------------------------------ 347 # ------------------------------------
350 if (is_clang) { 348 if (is_clang) {
(...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after
1449 1447
1450 if (is_ios || is_mac) { 1448 if (is_ios || is_mac) {
1451 # On Mac and iOS, this enables support for ARC (automatic ref-counting). 1449 # On Mac and iOS, this enables support for ARC (automatic ref-counting).
1452 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. 1450 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
1453 config("enable_arc") { 1451 config("enable_arc") {
1454 common_flags = [ "-fobjc-arc" ] 1452 common_flags = [ "-fobjc-arc" ]
1455 cflags_objc = common_flags 1453 cflags_objc = common_flags
1456 cflags_objcc = common_flags 1454 cflags_objcc = common_flags
1457 } 1455 }
1458 } 1456 }
OLDNEW
« build/common.gypi ('K') | « build/common.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698