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

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

Issue 2031233002: Rework how MB and GN handle concurrent links. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move concurrent_links into a dedicated .gni Created 4 years, 6 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
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/ios/ios_sdk.gni") 10 import("//build/config/ios/ios_sdk.gni")
11 import("//build/config/mac/mac_sdk.gni") 11 import("//build/config/mac/mac_sdk.gni")
12 import("//build/config/mac/symbols.gni") 12 import("//build/config/mac/symbols.gni")
13 13
14 assert(host_os == "mac") 14 assert(host_os == "mac")
15 15
16 import("//build/toolchain/goma.gni") 16 import("//build/toolchain/goma.gni")
17 import("//build/toolchain/toolchain.gni") 17 import("//build/toolchain/toolchain.gni")
18 import("//build/toolchain/concurrent_links.gni")
18 19
19 if (use_goma) { 20 if (use_goma) {
20 goma_prefix = "$goma_dir/gomacc " 21 goma_prefix = "$goma_dir/gomacc "
21 } else { 22 } else {
22 goma_prefix = "" 23 goma_prefix = ""
23 } 24 }
24 25
25 # This will copy the gyp-mac-tool to the build directory. We pass in the source 26 # This will copy the gyp-mac-tool to the build directory. We pass in the source
26 # file of the mac tool. 27 # file of the mac tool.
27 gyp_mac_tool_source = 28 gyp_mac_tool_source =
28 rebase_path("//tools/gyp/pylib/gyp/mac_tool.py", root_build_dir) 29 rebase_path("//tools/gyp/pylib/gyp/mac_tool.py", root_build_dir)
29 exec_script("setup_toolchain.py", [ gyp_mac_tool_source ]) 30 exec_script("setup_toolchain.py", [ gyp_mac_tool_source ])
30 31
31 # Shared toolchain definition. Invocations should set toolchain_os to set the 32 # Shared toolchain definition. Invocations should set toolchain_os to set the
32 # build args in this definition. 33 # build args in this definition.
33 template("mac_toolchain") { 34 template("mac_toolchain") {
34 toolchain(target_name) { 35 toolchain(target_name) {
35 assert(defined(invoker.cc), "mac_toolchain() must specify a \"cc\" value") 36 assert(defined(invoker.cc), "mac_toolchain() must specify a \"cc\" value")
36 assert(defined(invoker.cxx), "mac_toolchain() must specify a \"cxx\" value") 37 assert(defined(invoker.cxx), "mac_toolchain() must specify a \"cxx\" value")
37 assert(defined(invoker.ld), "mac_toolchain() must specify a \"ld\" value") 38 assert(defined(invoker.ld), "mac_toolchain() must specify a \"ld\" value")
38 assert(defined(invoker.toolchain_cpu), 39 assert(defined(invoker.toolchain_cpu),
39 "mac_toolchain() must specify a \"toolchain_cpu\"") 40 "mac_toolchain() must specify a \"toolchain_cpu\"")
40 assert(defined(invoker.toolchain_os), 41 assert(defined(invoker.toolchain_os),
41 "mac_toolchain() must specify a \"toolchain_os\"") 42 "mac_toolchain() must specify a \"toolchain_os\"")
42 43
44 # concurrent_links is picked up from the declare_arg().
brettw 2016/06/06 17:33:38 Can you mention the .gni file here?
45
43 # We can't do string interpolation ($ in strings) on things with dots in 46 # We can't do string interpolation ($ in strings) on things with dots in
44 # them. To allow us to use $cc below, for example, we create copies of 47 # them. To allow us to use $cc below, for example, we create copies of
45 # these values in our scope. 48 # these values in our scope.
46 cc = invoker.cc 49 cc = invoker.cc
47 cxx = invoker.cxx 50 cxx = invoker.cxx
48 ld = invoker.ld 51 ld = invoker.ld
49 52
50 linker_driver = 53 linker_driver =
51 rebase_path("//build/toolchain/mac/linker_driver.py", root_build_dir) 54 rebase_path("//build/toolchain/mac/linker_driver.py", root_build_dir)
52 55
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 } 379 }
377 380
378 mac_toolchain("x64") { 381 mac_toolchain("x64") {
379 toolchain_cpu = "x64" 382 toolchain_cpu = "x64"
380 toolchain_os = "mac" 383 toolchain_os = "mac"
381 cc = "${goma_prefix}/gcc" 384 cc = "${goma_prefix}/gcc"
382 cxx = "${goma_prefix}/g++" 385 cxx = "${goma_prefix}/g++"
383 ld = cxx 386 ld = cxx
384 is_clang = false 387 is_clang = false
385 } 388 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698