Index: build/android/envsetup.sh |
diff --git a/build/android/envsetup.sh b/build/android/envsetup.sh |
index 5d2108951540b496f84c903c134480babd63444d..6c4c563d31e1b15ca7e7b4f0b2c86d8fa1724fcb 100755 |
--- a/build/android/envsetup.sh |
+++ b/build/android/envsetup.sh |
@@ -70,20 +70,21 @@ fi |
# Performs a gyp_chromium run to convert gyp->Makefile for android code. |
android_gyp() { |
+ GOMA_WRAPPER="" |
+ if [[ -d $GOMA_DIR ]]; then |
+ GOMA_WRAPPER="$GOMA_DIR/gomacc" |
+ fi |
+ # Ninja requires "*_target" for target builds. |
+ GOMA_WRAPPER=${GOMA_WRAPPER} \ |
+ CC_target=$(basename ${ANDROID_TOOLCHAIN}/*-gcc) \ |
+ CXX_target=$(basename ${ANDROID_TOOLCHAIN}/*-g++) \ |
+ LINK_target=$(basename ${ANDROID_TOOLCHAIN}/*-gcc) \ |
+ AR_target=$(basename ${ANDROID_TOOLCHAIN}/*-ar) \ |
"${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" |
} |
-firstword() { |
- echo "${1}" |
-} |
- |
-export CROSS_AR="$(firstword "${ANDROID_TOOLCHAIN}"/*-ar)" |
-export CROSS_CC="$(firstword "${ANDROID_TOOLCHAIN}"/*-gcc)" |
-export CROSS_CXX="$(firstword "${ANDROID_TOOLCHAIN}"/*-g++)" |
-export CROSS_LINK="$(firstword "${ANDROID_TOOLCHAIN}"/*-gcc)" |
-export CROSS_RANLIB="$(firstword "${ANDROID_TOOLCHAIN}"/*-ranlib)" |
-export OBJCOPY="$(firstword "${ANDROID_TOOLCHAIN}"/*-objcopy)" |
-export STRIP="$(firstword "${ANDROID_TOOLCHAIN}"/*-strip)" |
+export OBJCOPY=$(echo ${ANDROID_TOOLCHAIN}/*-objcopy) |
+export STRIP=$(echo ${ANDROID_TOOLCHAIN}/*-strip) |
Peter Beverloo
2012/03/16 17:31:33
nit: you use "echo" here while using "basename" ab
|
# The set of GYP_DEFINES to pass to gyp. Use 'readlink -e' on directories |
# to canonicalize them (remove double '/', remove trailing '/', etc). |