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

Side by Side Diff: build/toolchain/gcc_toolchain.gni

Issue 936103003: Roll GN binaries to #317120 for the cpu_arch changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn_cpu_arch_changes
Patch Set: fix android_gcc_toolchain() invocations for new toolchains Created 5 years, 10 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 | « build/toolchain/cros/BUILD.gn ('k') | build/toolchain/linux/BUILD.gn » ('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 # This value will be inherited in the toolchain below. 5 # This value will be inherited in the toolchain below.
6 concurrent_links = exec_script("get_concurrent_links.py", [], "value") 6 concurrent_links = exec_script("get_concurrent_links.py", [], "value")
7 7
8 # This template defines a toolchain for something that works like gcc 8 # This template defines a toolchain for something that works like gcc
9 # (including clang). 9 # (including clang).
10 # 10 #
(...skipping 22 matching lines...) Expand all
33 # command. 33 # command.
34 # - deps 34 # - deps
35 # Just forwarded to the toolchain definition. 35 # Just forwarded to the toolchain definition.
36 # - is_clang 36 # - is_clang
37 template("gcc_toolchain") { 37 template("gcc_toolchain") {
38 toolchain(target_name) { 38 toolchain(target_name) {
39 assert(defined(invoker.cc), "gcc_toolchain() must specify a \"cc\" value") 39 assert(defined(invoker.cc), "gcc_toolchain() must specify a \"cc\" value")
40 assert(defined(invoker.cxx), "gcc_toolchain() must specify a \"cxx\" value") 40 assert(defined(invoker.cxx), "gcc_toolchain() must specify a \"cxx\" value")
41 assert(defined(invoker.ar), "gcc_toolchain() must specify a \"ar\" value") 41 assert(defined(invoker.ar), "gcc_toolchain() must specify a \"ar\" value")
42 assert(defined(invoker.ld), "gcc_toolchain() must specify a \"ld\" value") 42 assert(defined(invoker.ld), "gcc_toolchain() must specify a \"ld\" value")
43 assert(defined(invoker.toolchain_cpu_arch), 43 assert(defined(invoker.toolchain_cpu),
44 "gcc_toolchain() must specify a \"toolchain_cpu_arch\"") 44 "gcc_toolchain() must specify a \"toolchain_cpu\"")
45 assert(defined(invoker.toolchain_os), 45 assert(defined(invoker.toolchain_os),
46 "gcc_toolchain() must specify a \"toolchain_os\"") 46 "gcc_toolchain() must specify a \"toolchain_os\"")
47 47
48 # We can't do string interpolation ($ in strings) on things with dots in 48 # We can't do string interpolation ($ in strings) on things with dots in
49 # them. To allow us to use $cc below, for example, we create copies of 49 # them. To allow us to use $cc below, for example, we create copies of
50 # these values in our scope. 50 # these values in our scope.
51 cc = invoker.cc 51 cc = invoker.cc
52 cxx = invoker.cxx 52 cxx = invoker.cxx
53 ar = invoker.ar 53 ar = invoker.ar
54 ld = invoker.ld 54 ld = invoker.ld
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 } 197 }
198 198
199 tool("copy") { 199 tool("copy") {
200 command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} & & cp -af {{source}} {{output}})" 200 command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} & & cp -af {{source}} {{output}})"
201 description = "COPY {{source}} {{output}}" 201 description = "COPY {{source}} {{output}}"
202 } 202 }
203 203
204 # When invoking this toolchain not as the default one, these args will be 204 # When invoking this toolchain not as the default one, these args will be
205 # passed to the build. They are ignored when this is the default toolchain. 205 # passed to the build. They are ignored when this is the default toolchain.
206 toolchain_args() { 206 toolchain_args() {
207 cpu_arch = invoker.toolchain_cpu_arch 207 current_cpu = invoker.toolchain_cpu
208 os = invoker.toolchain_os 208 current_os = invoker.toolchain_os
209
210 # These values need to be passed through unchanged.
211 target_os = target_os
212 target_cpu = target_cpu
213
214 # TODO(dpranke): These values are here for backwards compatibility and
215 # should be deleted when all of the builders and configs have been
216 # updated.
217 cpu_arch = current_cpu
218 os = current_os
219
209 if (defined(invoker.is_clang)) { 220 if (defined(invoker.is_clang)) {
210 is_clang = invoker.is_clang 221 is_clang = invoker.is_clang
211 } 222 }
212 } 223 }
213 224
214 if (defined(invoker.deps)) { 225 if (defined(invoker.deps)) {
215 deps = invoker.deps 226 deps = invoker.deps
216 } 227 }
217 } 228 }
218 } 229 }
OLDNEW
« no previous file with comments | « build/toolchain/cros/BUILD.gn ('k') | build/toolchain/linux/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698