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

Unified Diff: build/android/buildbot_functions.sh

Issue 10898019: Adding support for ninja. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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/android/buildbot_functions.sh
diff --git a/build/android/buildbot_functions.sh b/build/android/buildbot_functions.sh
index 0b6f51fe69697f5ac18081d634439a83717c3900..06e85c06374eb9438868f5e9b65f2678900453be 100755
--- a/build/android/buildbot_functions.sh
+++ b/build/android/buildbot_functions.sh
@@ -84,6 +84,8 @@ function bb_baseline_setup {
NEED_CLOBBER=1
fi
+ export GYP_GENERATORS=ninja
Yaron 2012/08/28 23:38:33 You only want to set this if you're building for n
sivachandra 2012/08/29 16:52:01 Moved to a more appropriate place in patch set 2.
+
. build/android/envsetup.sh
if [ "$NEED_CLOBBER" -eq 1 ]; then
@@ -152,14 +154,11 @@ function bb_stop_goma_internal {
# $@: make args.
# Use goma if possible; degrades to non-Goma if needed.
function bb_goma_make {
- bb_setup_goma_internal
-
if [ "${GOMA_DIR}" = "" ]; then
make -j${JOBS} "$@"
return
fi
- BUILDTYPE=$(bb_get_json_prop "$FACTORY_PROPERTIES" target)
HOST_CC=$GOMA_DIR/gcc
HOST_CXX=$GOMA_DIR/g++
TARGET_CC=$(/bin/ls $ANDROID_TOOLCHAIN/*-gcc | head -n1)
@@ -186,16 +185,33 @@ function bb_goma_make {
"$@"
local make_exit_code=$?
- bb_stop_goma_internal
return $make_exit_code
}
+# Build using ninja.
+function bb_goma_ninja {
+ echo "Using ninja to build."
+ ninja -C out/$BUILDTYPE -j120 -l20
+}
+
# Compile step
function bb_compile {
# This must be named 'compile', not 'Compile', for CQ interaction.
# Talk to maruel for details.
echo "@@@BUILD_STEP compile@@@"
- bb_goma_make
+
+ BUILDTYPE=$(bb_get_json_prop "$FACTORY_PROPERTIES" target)
+ BUILDTOOL=$(bb_get_json_prop "$FACTORY_PROPERTIES" buildtool)
+
+ bb_setup_goma_internal
+
+ if [ $BUILDTOOL = "ninja" ]; then
+ bb_goma_ninja
+ else
+ bb_goma_make
+ fi
+
+ bb_stop_goma_internal
}
# Experimental compile step; does not turn the tree red if it fails.
@@ -327,5 +343,5 @@ function bb_get_json_prop {
local JSON="$1"
local PROP="$2"
- python -c "import json; print json.loads('$JSON')['$PROP']"
+ python -c "import json; print json.loads('$JSON').get('$PROP')"
}
« 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