Chromium Code Reviews| Index: build/android/envsetup.sh |
| diff --git a/build/android/envsetup.sh b/build/android/envsetup.sh |
| index b0024858d70492f11ba2de8a541d7c71341a9f03..a4046f21997fd491e3f833583ff411b930677df5 100755 |
| --- a/build/android/envsetup.sh |
| +++ b/build/android/envsetup.sh |
| @@ -104,7 +104,22 @@ export AR_target=$(echo -n ${ANDROID_TOOLCHAIN}/*-ar) |
| # Performs a gyp_chromium run to convert gyp->Makefile for android code. |
| android_gyp() { |
| echo "GYP_GENERATORS set to '$GYP_GENERATORS'" |
| - "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@" |
| + # http://crbug.com/143889. |
| + # In case we are doing a Clang build, we have to unset CC_target and |
| + # CXX_target. Otherwise GYP ends up generating a gcc build (although we set |
| + # 'clang' to 1). This behavior was introduced by |
| + # 54d2f6fe6d8a7b9d9786bd1f8540df6b4f46b83f in GYP. |
| + ( |
| + # Fork to avoid side effects on the user's environment variables. |
| + if echo "$GYP_DEFINES" | grep -q clang; then |
|
hans
2012/09/03 13:53:19
What if i have clang=0 in my GYP_DEFINES?
This loo
Philippe
2012/09/03 14:02:29
Indeed. I guess you would be the first one to have
|
| + if echo "$CC_target" | grep -q gcc; then |
| + unset AR_target |
| + unset CC_target |
| + unset CXX_target |
| + fi |
| + fi |
| + "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@" |
| + ) |
| } |
| # FLOCK needs to be null on system that has no flock |