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

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

Issue 2382653003: Enable GN build on Mac. (Closed)
Patch Set: Cleanup Created 4 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 | « build/config/mac/mac_sdk.gni ('k') | tools/gn.py » ('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 # 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 12
13 assert(host_os == "mac") 13 assert(host_os == "mac")
14 14
15 import("//build/toolchain/clang.gni") 15 import("//build/toolchain/clang.gni")
16 import("//build/toolchain/goma.gni") 16 import("//build/toolchain/goma.gni")
17 import("//build/config/sysroot.gni") 17 import("//build/config/sysroot.gni")
18 18
19 if (use_goma) { 19 if (use_goma) {
20 goma_prefix = "$goma_dir/gomacc " 20 goma_prefix = "$goma_dir/gomacc "
21 } else { 21 } else {
22 goma_prefix = "" 22 goma_prefix = ""
23 } 23 }
24 24
25 # This will copy the gyp-mac-tool to the build directory. We pass in the source 25 # This will copy the gyp-mac-tool to the build directory. We pass in the source
26 # file of the win tool. 26 # file of the win tool.
27 gyp_mac_tool_source = 27 gyp_mac_tool_source =
28 rebase_path("//tools/gyp/pylib/gyp/mac_tool.py", root_build_dir) 28 rebase_path("//third_party/gyp/pylib/gyp/mac_tool.py", root_build_dir)
29 exec_script("setup_toolchain.py", [ gyp_mac_tool_source ]) 29 exec_script("setup_toolchain.py", [ gyp_mac_tool_source ])
30 30
31 # Shared toolchain definition. Invocations should set toolchain_os to set the 31 # Shared toolchain definition. Invocations should set toolchain_os to set the
32 # build args in this definition. 32 # build args in this definition.
33 template("mac_toolchain") { 33 template("mac_toolchain") {
34 toolchain(target_name) { 34 toolchain(target_name) {
35 assert(defined(invoker.cc), "mac_toolchain() must specify a \"cc\" value") 35 assert(defined(invoker.cc), "mac_toolchain() must specify a \"cc\" value")
36 assert(defined(invoker.cxx), "mac_toolchain() must specify a \"cxx\" value") 36 assert(defined(invoker.cxx), "mac_toolchain() must specify a \"cxx\" value")
37 assert(defined(invoker.ld), "mac_toolchain() must specify a \"ld\" value") 37 assert(defined(invoker.ld), "mac_toolchain() must specify a \"ld\" value")
38 assert(defined(invoker.toolchain_cpu), 38 assert(defined(invoker.toolchain_cpu),
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 toolchain_cpu = "i386" 252 toolchain_cpu = "i386"
253 toolchain_os = "mac" 253 toolchain_os = "mac"
254 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", 254 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
255 root_build_dir) 255 root_build_dir)
256 cc = "${goma_prefix}$prefix/clang" 256 cc = "${goma_prefix}$prefix/clang"
257 cxx = "${goma_prefix}$prefix/clang++" 257 cxx = "${goma_prefix}$prefix/clang++"
258 ld = cxx 258 ld = cxx
259 is_clang = true 259 is_clang = true
260 sysroot_flags = "-isysroot $mac_sdk_path -mmacosx-version-min=$mac_sdk_min" 260 sysroot_flags = "-isysroot $mac_sdk_path -mmacosx-version-min=$mac_sdk_min"
261 } 261 }
OLDNEW
« no previous file with comments | « build/config/mac/mac_sdk.gni ('k') | tools/gn.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698