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

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

Issue 136273007: Fix gyp on OS X with use_goma=1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« 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")
brettw 2014/01/18 22:04:52 I've been trying to do absolute paths for imports
Nico 2014/01/18 22:06:03 I'll try to remember :-) I cribbed this from toolc
10
9 # Should only be running on Mac. 11 # Should only be running on Mac.
10 assert(is_mac || is_ios) 12 assert(is_mac || is_ios)
11 13
12 import("//build/toolchain/clang.gni") 14 import("//build/toolchain/clang.gni")
13 import("//build/toolchain/goma.gni") 15 import("//build/toolchain/goma.gni")
14 16
15 if (is_clang) { 17 if (is_clang) {
16 cc = rebase_path("//third_party/llvm-build/Release+Asserts/bin/clang", ".", ro ot_build_dir) 18 cc = rebase_path("//third_party/llvm-build/Release+Asserts/bin/clang", ".", ro ot_build_dir)
17 cxx = rebase_path("//third_party/llvm-build/Release+Asserts/bin/clang++", ".", root_build_dir) 19 cxx = rebase_path("//third_party/llvm-build/Release+Asserts/bin/clang++", ".", root_build_dir)
18 20
19 # Set the GYP header for all toolchains when running under Clang. 21 # Set the GYP header for all toolchains when running under Clang.
20 if (is_gyp) { 22 if (is_gyp) {
21 gyp_header = "'make_global_settings': [" + make_clang_global_settings + "]," 23 make_global_settings = make_clang_global_settings
24
25 if (use_goma) {
26 # There is a TODO(yyanagisawa) in common.gypi about the make generator not
27 # supporting CC_wrapper without CC. As a result, we must add a condition
28 # when on the generator when we're not explicitly setting the variables
29 # above (which happens when gyp_header is empty at this point).
30 #
31 # GYP will interpret the file once for each generator, so we have to write
32 # this condition into the GYP file since the user could have more than one
33 # generator set.
34 gyp_header =
35 "'conditions':" +
36 "[['\"<(GENERATOR)\"==\"ninja\"', { 'make_global_settings': [" +
37 make_global_settings +
38 make_goma_global_settings +
39 "]}]],"
40 } else {
41 gyp_header = "'make_global_settings': [" + make_global_settings + "],"
42 }
22 } 43 }
23 } else { 44 } else {
24 cc = "gcc" 45 cc = "gcc"
25 cxx = "g++" 46 cxx = "g++"
26 } 47 }
27 ld = cxx 48 ld = cxx
28 49
29 # This will copy the gyp-mac-tool to the build directory. We pass in the source 50 # This will copy the gyp-mac-tool to the build directory. We pass in the source
30 # file of the win tool. 51 # file of the win tool.
31 gyp_mac_tool_source = 52 gyp_mac_tool_source =
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 #} 111 #}
91 tool("stamp") { 112 tool("stamp") {
92 command = "\${postbuilds}touch \$out" 113 command = "\${postbuilds}touch \$out"
93 description = "STAMP \$out" 114 description = "STAMP \$out"
94 } 115 }
95 tool("copy") { 116 tool("copy") {
96 command = "ln -f \$in \$out 2>/dev/null || (rm -rf \$out && cp -af \$in \$ou t)" 117 command = "ln -f \$in \$out 2>/dev/null || (rm -rf \$out && cp -af \$in \$ou t)"
97 description = "COPY \$in \$out" 118 description = "COPY \$in \$out"
98 } 119 }
99 } 120 }
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