| OLD | NEW | 
|    1 #!/bin/bash |    1 #!/bin/bash | 
|    2  |    2  | 
|    3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |    3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 
|    4 # Use of this source code is governed by a BSD-style license that can be |    4 # Use of this source code is governed by a BSD-style license that can be | 
|    5 # found in the LICENSE file. |    5 # found in the LICENSE file. | 
|    6  |    6  | 
|    7 # Sets up environment for building Chromium on Android.  It can either be |    7 # Sets up environment for building Chromium on Android.  It can either be | 
|    8 # compiled with the Android tree or using the Android SDK/NDK. To build with |    8 # compiled with the Android tree or using the Android SDK/NDK. To build with | 
|    9 # NDK/SDK: ". build/android/envsetup.sh --sdk".  Environment variable |    9 # NDK/SDK: ". build/android/envsetup.sh --sdk".  Environment variable | 
|   10 # ANDROID_SDK_BUILD=1 will then be defined and used in the rest of the setup to |   10 # ANDROID_SDK_BUILD=1 will then be defined and used in the rest of the setup to | 
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  100  |  100  | 
|  101 ANDROID_GOMA_WRAPPER="" |  101 ANDROID_GOMA_WRAPPER="" | 
|  102 if [[ -d $GOMA_DIR ]]; then |  102 if [[ -d $GOMA_DIR ]]; then | 
|  103   ANDROID_GOMA_WRAPPER="$GOMA_DIR/gomacc" |  103   ANDROID_GOMA_WRAPPER="$GOMA_DIR/gomacc" | 
|  104 fi |  104 fi | 
|  105 export ANDROID_GOMA_WRAPPER |  105 export ANDROID_GOMA_WRAPPER | 
|  106  |  106  | 
|  107 # Declare Android are cross compile. |  107 # Declare Android are cross compile. | 
|  108 export GYP_CROSSCOMPILE=1 |  108 export GYP_CROSSCOMPILE=1 | 
|  109  |  109  | 
|  110 export CXX_target="${ANDROID_GOMA_WRAPPER} \ |  | 
|  111     $(echo -n ${ANDROID_TOOLCHAIN}/*-g++)" |  | 
|  112  |  | 
|  113 # Performs a gyp_chromium run to convert gyp->Makefile for android code. |  110 # Performs a gyp_chromium run to convert gyp->Makefile for android code. | 
|  114 android_gyp() { |  111 android_gyp() { | 
 |  112   # This is just a simple wrapper of gyp_chromium, please don't add anything | 
 |  113   # in this function. | 
|  115   echo "GYP_GENERATORS set to '$GYP_GENERATORS'" |  114   echo "GYP_GENERATORS set to '$GYP_GENERATORS'" | 
|  116   # http://crbug.com/143889. |  | 
|  117   # In case we are doing a Clang build, we have to unset CC_target and |  | 
|  118   # CXX_target. Otherwise GYP ends up generating a gcc build (although we set |  | 
|  119   # 'clang' to 1). This behavior was introduced by |  | 
|  120   # 54d2f6fe6d8a7b9d9786bd1f8540df6b4f46b83f in GYP. |  | 
|  121   ( |  115   ( | 
|  122     # Fork to avoid side effects on the user's environment variables. |  | 
|  123     if echo "$GYP_DEFINES" | grep -qE '(clang|asan)'; then |  | 
|  124       if echo "$CXX_target" | grep -q g++; then |  | 
|  125         unset CXX_target |  | 
|  126       fi |  | 
|  127     fi |  | 
|  128     "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@" |  116     "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@" | 
|  129   ) |  117   ) | 
|  130 } |  118 } | 
|  131  |  119  | 
|  132 # FLOCK needs to be null on system that has no flock |  120 # FLOCK needs to be null on system that has no flock | 
|  133 which flock > /dev/null || export FLOCK= |  121 which flock > /dev/null || export FLOCK= | 
| OLD | NEW |