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

Unified Diff: build/toolchain/goma.gni

Issue 117863003: Work on GN toolchain definitions and build (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
Index: build/toolchain/goma.gni
diff --git a/build/toolchain/goma.gni b/build/toolchain/goma.gni
new file mode 100644
index 0000000000000000000000000000000000000000..7de60de3bb1e4e3a2994a68a476e5cd1d80c279c
--- /dev/null
+++ b/build/toolchain/goma.gni
@@ -0,0 +1,52 @@
+# Copyright (c) 2013 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Defines the configuration of Goma.
+#
+# This is currently designed to match the GYP build exactly, so as not to break
+# people during the transition.
+#
+# TODO(brettw) make Android work like normal Linux. It's silly that Android has
+# completely different logic for configuring Goma.
Nico 2013/12/26 22:14:34 +1000, this is true for many things in the android
+
+declare_args() {
+ use_goma = false
+
+ goma_dir = ""
Nico 2013/12/26 22:14:34 It defaults to `/bin/echo -n ${HOME}/goma` on non-
+
+ # Goma directory used by the Android build. Empty means use the GOMA_DIR
+ # environment variable.
+ #
+ # TODO(brettw) remove this and make it work like regular Linux.
+ android_goma_dir = ""
+}
+
+# The Android GYP build has some log that automatically turns on goma when the
Nico 2013/12/26 22:14:34 …some logic…
+# directory is set, but this isn't done for other platforms.
+# TODO(brettw) rationalize all Linux-y platforms.
+if (is_android && android_goma_dir != "") {
+ use_goma = true
+}
+
+if (use_goma && goma_dir == "") {
+ # Set the default goma directory. This must be a character-for-character
+ # match for the GYP default or else the compilers for the different targets
+ # won't match and GYP will assert.
+ if (is_win) {
+ goma_dir = "c:\goma\goma-win"
+ } else if (is_android) {
+ goma_dir = exec_script("android/default_goma_for_android.py", [], "value")
+ }
+}
+
+if (use_goma) {
+ # Define the toolchain for the GYP build when using goma.
+ make_goma_global_settings =
+ "'make_global_settings': [" +
+ "['CC_wrapper', '$goma_dir/gomacc']," +
+ "['CXX_wrapper', '$goma_dir/gomacc']," +
+ "['CC.host_wrapper', '$gomadir/gomacc']," +
+ "['CXX.host_wrapper', '$gomadir/gomacc']," +
+ "],"
+}

Powered by Google App Engine
This is Rietveld 408576698