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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 88 |
89 # Source a bunch of helper functions | 89 # Source a bunch of helper functions |
90 . ${CHROME_SRC}/build/android/adb_device_functions.sh | 90 . ${CHROME_SRC}/build/android/adb_device_functions.sh |
91 | 91 |
92 ANDROID_GOMA_WRAPPER="" | 92 ANDROID_GOMA_WRAPPER="" |
93 if [[ -d $GOMA_DIR ]]; then | 93 if [[ -d $GOMA_DIR ]]; then |
94 ANDROID_GOMA_WRAPPER="$GOMA_DIR/gomacc" | 94 ANDROID_GOMA_WRAPPER="$GOMA_DIR/gomacc" |
95 fi | 95 fi |
96 export ANDROID_GOMA_WRAPPER | 96 export ANDROID_GOMA_WRAPPER |
97 | 97 |
98 export CC_target=$(basename ${ANDROID_TOOLCHAIN}/*-gcc) | 98 export CC_target="${ANDROID_GOMA_WRAPPER} $(echo -n ${ANDROID_TOOLCHAIN}/*-gcc)" |
99 export CXX_target=$(basename ${ANDROID_TOOLCHAIN}/*-g++) | 99 export CXX_target="${ANDROID_GOMA_WRAPPER} \ |
100 export LINK_target=$(basename ${ANDROID_TOOLCHAIN}/*-gcc) | 100 $(echo -n ${ANDROID_TOOLCHAIN}/*-g++)" |
101 export AR_target=$(basename ${ANDROID_TOOLCHAIN}/*-ar) | 101 export LINK_target=$(echo -n ${ANDROID_TOOLCHAIN}/*-gcc) |
| 102 export AR_target=$(echo -n ${ANDROID_TOOLCHAIN}/*-ar) |
102 | 103 |
103 # Performs a gyp_chromium run to convert gyp->Makefile for android code. | 104 # Performs a gyp_chromium run to convert gyp->Makefile for android code. |
104 android_gyp() { | 105 android_gyp() { |
105 echo "GYP_GENERATORS set to '$GYP_GENERATORS'" | 106 echo "GYP_GENERATORS set to '$GYP_GENERATORS'" |
106 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@" | 107 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@" |
107 } | 108 } |
108 | 109 |
109 # FLOCK needs to be null on system that has no flock | 110 # FLOCK needs to be null on system that has no flock |
110 which flock > /dev/null || export FLOCK= | 111 which flock > /dev/null || export FLOCK= |
OLD | NEW |