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

Side by Side Diff: build/toolchain/mac/BUILD.gn

Issue 2229063002: Remove GN forwarding of the target variables. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@args_impl
Patch Set: fixes Created 4 years, 4 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/gcc_toolchain.gni ('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 # TODO(brettw) Use "gcc_toolchain.gni" like the Linux toolchains. This requires 5 # TODO(brettw) Use "gcc_toolchain.gni" like the Linux toolchains. This requires
6 # some enhancements since the commands on Mac are slightly different than on 6 # some enhancements since the commands on Mac are slightly different than on
7 # Linux. 7 # Linux.
8 8
9 import("../goma.gni") 9 import("../goma.gni")
10 import("//build/config/clang/clang.gni") 10 import("//build/config/clang/clang.gni")
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 template("mac_toolchain") { 66 template("mac_toolchain") {
67 toolchain(target_name) { 67 toolchain(target_name) {
68 # When invoking this toolchain not as the default one, these args will be 68 # When invoking this toolchain not as the default one, these args will be
69 # passed to the build. They are ignored when this is the default toolchain. 69 # passed to the build. They are ignored when this is the default toolchain.
70 assert(defined(invoker.toolchain_args), 70 assert(defined(invoker.toolchain_args),
71 "Toolchains must declare toolchain_args") 71 "Toolchains must declare toolchain_args")
72 toolchain_args = { 72 toolchain_args = {
73 # Populate toolchain args from the invoker. 73 # Populate toolchain args from the invoker.
74 forward_variables_from(invoker.toolchain_args, "*") 74 forward_variables_from(invoker.toolchain_args, "*")
75 75
76 # These values need to be passed through unchanged to all secondary 76 # The host toolchain value computed by the default toolchain's setup
77 # toolchains. BUILDCONFIG.gn sets some defaults based on the values of 77 # needs to be passed through unchanged to all secondary toolchains to
78 # the operating system and compiler, and we want to force the values to 78 # ensure that it's always the same, regardless of the values that may be
79 # be consistent if re-running the computation in another context leads 79 # set on those toolchains.
80 # to different defaults.
81 host_toolchain = host_toolchain 80 host_toolchain = host_toolchain
82 target_os = target_os
83 target_cpu = target_cpu
84 } 81 }
85 82
86 # When the invoker has explicitly overridden use_goma or cc_wrapper in the 83 # When the invoker has explicitly overridden use_goma or cc_wrapper in the
87 # toolchain args, use those values, otherwise default to the global one. 84 # toolchain args, use those values, otherwise default to the global one.
88 # This works because the only reasonable override that toolchains might 85 # This works because the only reasonable override that toolchains might
89 # supply for these values are to force-disable them. 86 # supply for these values are to force-disable them.
90 if (defined(toolchain_args.use_goma)) { 87 if (defined(toolchain_args.use_goma)) {
91 toolchain_uses_goma = toolchain_args.use_goma 88 toolchain_uses_goma = toolchain_args.use_goma
92 } else { 89 } else {
93 toolchain_uses_goma = use_goma 90 toolchain_uses_goma = use_goma
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 } 450 }
454 } 451 }
455 452
456 mac_toolchain("ios_clang_x64") { 453 mac_toolchain("ios_clang_x64") {
457 toolchain_args = { 454 toolchain_args = {
458 current_cpu = "x64" 455 current_cpu = "x64"
459 current_os = "ios" 456 current_os = "ios"
460 } 457 }
461 } 458 }
462 } 459 }
OLDNEW
« no previous file with comments | « build/toolchain/gcc_toolchain.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698