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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/toolchain/mac/BUILD.gn
diff --git a/build/toolchain/mac/BUILD.gn b/build/toolchain/mac/BUILD.gn
index 7e552d6c1b3c7dc627f5c347244aac939dbe5c77..1ff00b22e8dad68b4892e96268ebcb063fe81a5f 100644
--- a/build/toolchain/mac/BUILD.gn
+++ b/build/toolchain/mac/BUILD.gn
@@ -6,6 +6,8 @@
# some enhancements since the commands on Mac are slightly different than on
# Linux.
+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
+
# Should only be running on Mac.
assert(is_mac || is_ios)
@@ -18,7 +20,26 @@ if (is_clang) {
# Set the GYP header for all toolchains when running under Clang.
if (is_gyp) {
- gyp_header = "'make_global_settings': [" + make_clang_global_settings + "],"
+ make_global_settings = make_clang_global_settings
+
+ if (use_goma) {
+ # There is a TODO(yyanagisawa) in common.gypi about the make generator not
+ # supporting CC_wrapper without CC. As a result, we must add a condition
+ # when on the generator when we're not explicitly setting the variables
+ # above (which happens when gyp_header is empty at this point).
+ #
+ # GYP will interpret the file once for each generator, so we have to write
+ # this condition into the GYP file since the user could have more than one
+ # generator set.
+ gyp_header =
+ "'conditions':" +
+ "[['\"<(GENERATOR)\"==\"ninja\"', { 'make_global_settings': [" +
+ make_global_settings +
+ make_goma_global_settings +
+ "]}]],"
+ } else {
+ gyp_header = "'make_global_settings': [" + make_global_settings + "],"
+ }
}
} else {
cc = "gcc"
« 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