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

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

Issue 1390383002: GN: Refactor Linux Clang toolchain definitions, plumb use_gold for toolchain_args() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « no previous file | build/toolchain/gcc_toolchain.gni » ('j') | 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/toolchain/ccache.gni") 8 import("//build/toolchain/ccache.gni")
9 9
10 if (current_cpu == "arm") { 10 if (current_cpu == "arm") {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 # information to analyze. 43 # information to analyze.
44 # Requires profiling to be set to true. 44 # Requires profiling to be set to true.
45 enable_full_stack_frames_for_profiling = false 45 enable_full_stack_frames_for_profiling = false
46 46
47 # TODO(GYP): We should be using 64-bit gold for linking on both 64-bit Linux 47 # TODO(GYP): We should be using 64-bit gold for linking on both 64-bit Linux
48 # and 32-bit linux; 32-bit Gold runs out of address-space on 32-bit builds. 48 # and 32-bit linux; 32-bit Gold runs out of address-space on 32-bit builds.
49 # However, something isn't quite working right on the 32-bit builds. 49 # However, something isn't quite working right on the 32-bit builds.
50 use_gold = is_linux && current_cpu == "x64" 50 use_gold = is_linux && current_cpu == "x64"
51 51
52 # When we are going to use gold we need to find it. 52 # When we are going to use gold we need to find it.
53 if (use_gold) { 53 # This is initialized below, after use_gold might have been overridden.
54 gold_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin", 54 gold_path = false
55 root_build_dir)
56 } else {
57 gold_path = ""
58 }
59 55
60 # use_debug_fission: whether to use split DWARF debug info 56 # use_debug_fission: whether to use split DWARF debug info
61 # files. This can reduce link time significantly, but is incompatible 57 # files. This can reduce link time significantly, but is incompatible
62 # with some utilities such as icecc and ccache. Requires gold and 58 # with some utilities such as icecc and ccache. Requires gold and
63 # gcc >= 4.8 or clang. 59 # gcc >= 4.8 or clang.
64 # http://gcc.gnu.org/wiki/DebugFission 60 # http://gcc.gnu.org/wiki/DebugFission
65 use_debug_fission = is_debug && !is_win && use_gold && 61 #
66 linux_use_bundled_binutils && !use_ccache 62 # This is a placeholder value indicating that the code below should set
63 # the default. This is necessary to delay the evaluation of the default
64 # value expression until after its input values such as use_gold have
65 # been set, e.g. by a toolchain_args() block.
66 use_debug_fission = "default"
67 67
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 75
76 # Apply the default logic for these values if they were not set explicitly.
77 if (gold_path == false) {
78 if (use_gold) {
79 gold_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin",
80 root_build_dir)
81 } else {
82 gold_path = ""
83 }
84 }
85
86 if (use_debug_fission == "default") {
87 use_debug_fission = is_debug && !is_win && use_gold &&
88 linux_use_bundled_binutils && !use_ccache
89 }
90
76 # default_include_dirs --------------------------------------------------------- 91 # default_include_dirs ---------------------------------------------------------
77 # 92 #
78 # This is a separate config so that third_party code (which would not use the 93 # This is a separate config so that third_party code (which would not use the
79 # source root and might have conflicting versions of some headers) can remove 94 # source root and might have conflicting versions of some headers) can remove
80 # this and specify their own include paths. 95 # this and specify their own include paths.
81 config("default_include_dirs") { 96 config("default_include_dirs") {
82 include_dirs = [ 97 include_dirs = [
83 "//", 98 "//",
84 root_gen_dir, 99 root_gen_dir,
85 ] 100 ]
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 if (symbol_level == 0) { 1130 if (symbol_level == 0) {
1116 configs = [ ":no_symbols" ] 1131 configs = [ ":no_symbols" ]
1117 } else if (symbol_level == 1) { 1132 } else if (symbol_level == 1) {
1118 configs = [ ":minimal_symbols" ] 1133 configs = [ ":minimal_symbols" ]
1119 } else if (symbol_level == 2) { 1134 } else if (symbol_level == 2) {
1120 configs = [ ":symbols" ] 1135 configs = [ ":symbols" ]
1121 } else { 1136 } else {
1122 assert(false) 1137 assert(false)
1123 } 1138 }
1124 } 1139 }
OLDNEW
« no previous file with comments | « no previous file | build/toolchain/gcc_toolchain.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698