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

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

Issue 932013004: Make use_goma=true also work for Mac GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « no previous file | 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 10
11 # Should only be running on Mac. 11 # Should only be running on Mac.
12 assert(is_mac || is_ios) 12 assert(is_mac || is_ios)
13 13
14 import("//build/toolchain/clang.gni") 14 import("//build/toolchain/clang.gni")
15 import("//build/toolchain/goma.gni") 15 import("//build/toolchain/goma.gni")
16 16
17 if (use_goma) {
18 goma_prefix = "$goma_dir/gomacc "
19 } else {
20 goma_prefix = ""
21 }
22
17 if (is_clang) { 23 if (is_clang) {
18 cc = rebase_path("//third_party/llvm-build/Release+Asserts/bin/clang", 24 cc = rebase_path("//third_party/llvm-build/Release+Asserts/bin/clang",
19 root_build_dir) 25 root_build_dir)
20 cxx = rebase_path("//third_party/llvm-build/Release+Asserts/bin/clang++", 26 cxx = rebase_path("//third_party/llvm-build/Release+Asserts/bin/clang++",
21 root_build_dir) 27 root_build_dir)
22 } else { 28 } else {
23 cc = "gcc" 29 cc = "gcc"
24 cxx = "g++" 30 cxx = "g++"
25 } 31 }
32 cc = goma_prefix + cc
33 cxx = goma_prefix + cxx
26 ld = cxx 34 ld = cxx
27 35
28 # This will copy the gyp-mac-tool to the build directory. We pass in the source 36 # This will copy the gyp-mac-tool to the build directory. We pass in the source
29 # file of the win tool. 37 # file of the win tool.
30 gyp_mac_tool_source = 38 gyp_mac_tool_source =
31 rebase_path("//tools/gyp/pylib/gyp/mac_tool.py", root_build_dir) 39 rebase_path("//tools/gyp/pylib/gyp/mac_tool.py", root_build_dir)
32 exec_script("setup_toolchain.py", [ gyp_mac_tool_source ]) 40 exec_script("setup_toolchain.py", [ gyp_mac_tool_source ])
33 41
34 # Shared toolchain definition. Invocations should set toolchain_os to set the 42 # Shared toolchain definition. Invocations should set toolchain_os to set the
35 # build args in this definition. 43 # build args in this definition.
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 # Toolchain representing the target build (either mac or iOS). 202 # Toolchain representing the target build (either mac or iOS).
195 mac_clang_toolchain("clang") { 203 mac_clang_toolchain("clang") {
196 toolchain_os = os 204 toolchain_os = os
197 } 205 }
198 206
199 # This toolchain provides a way for iOS target compiles to reference targets 207 # This toolchain provides a way for iOS target compiles to reference targets
200 # compiled for the host system. It just overrides the OS back to "mac". 208 # compiled for the host system. It just overrides the OS back to "mac".
201 mac_clang_toolchain("host_clang") { 209 mac_clang_toolchain("host_clang") {
202 toolchain_os = "mac" 210 toolchain_os = "mac"
203 } 211 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698