OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 ############################################################################### | 2 ############################################################################### |
3 # Copyright 2015 Google Inc. | 3 # Copyright 2015 Google Inc. |
4 # | 4 # |
5 # Use of this source code is governed by a BSD-style license that can be | 5 # Use of this source code is governed by a BSD-style license that can be |
6 # found in the LICENSE file. | 6 # found in the LICENSE file. |
7 ############################################################################### | 7 ############################################################################### |
8 # | 8 # |
9 # android_setup.sh: Sets environment variables used by other Android scripts. | 9 # android_setup.sh: Sets environment variables used by other Android scripts. |
10 | 10 |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 DEFINES="${DEFINES} skia_arch_type=${ANDROID_ARCH-arm}" | 155 DEFINES="${DEFINES} skia_arch_type=${ANDROID_ARCH-arm}" |
156 # If ANDROID_IGNORE_UNKNOWN_DEVICE is set, extra gyp defines can be | 156 # If ANDROID_IGNORE_UNKNOWN_DEVICE is set, extra gyp defines can be |
157 # added via ANDROID_GYP_DEFINES | 157 # added via ANDROID_GYP_DEFINES |
158 DEFINES="${DEFINES} ${ANDROID_GYP_DEFINES}" | 158 DEFINES="${DEFINES} ${ANDROID_GYP_DEFINES}" |
159 ;; | 159 ;; |
160 esac | 160 esac |
161 | 161 |
162 verbose "The build is targeting the device: $TARGET_DEVICE" | 162 verbose "The build is targeting the device: $TARGET_DEVICE" |
163 exportVar DEVICE_ID $TARGET_DEVICE | 163 exportVar DEVICE_ID $TARGET_DEVICE |
164 | 164 |
165 # setup the appropriate cross compiling toolchains | 165 if [ -z "$SKIP_TOOLCHAIN_SETUP" ]; then |
166 source $SCRIPT_DIR/utils/setup_toolchain.sh | 166 # setup the appropriate cross compiling toolchains |
| 167 source $SCRIPT_DIR/utils/setup_toolchain.sh |
| 168 fi |
167 | 169 |
168 DEFINES="${DEFINES} android_toolchain=${TOOLCHAIN_TYPE}" | 170 DEFINES="${DEFINES} android_toolchain=${TOOLCHAIN_TYPE}" |
169 DEFINES="${DEFINES} android_buildtype=${BUILDTYPE}" | 171 DEFINES="${DEFINES} android_buildtype=${BUILDTYPE}" |
170 exportVar GYP_DEFINES "$DEFINES $GYP_DEFINES" | 172 exportVar GYP_DEFINES "$DEFINES $GYP_DEFINES" |
171 | 173 |
172 SKIA_SRC_DIR=$(cd "${SCRIPT_DIR}/../../.."; pwd) | 174 SKIA_SRC_DIR=$(cd "${SCRIPT_DIR}/../../.."; pwd) |
173 DEFAULT_SKIA_OUT="${SKIA_SRC_DIR}/out/config/android-${TARGET_DEVICE}" | 175 DEFAULT_SKIA_OUT="${SKIA_SRC_DIR}/out/config/android-${TARGET_DEVICE}" |
174 exportVar SKIA_OUT "${SKIA_OUT:-${DEFAULT_SKIA_OUT}}" | 176 exportVar SKIA_OUT "${SKIA_OUT:-${DEFAULT_SKIA_OUT}}" |
175 } | 177 } |
176 | 178 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 $ADB $DEVICE_SERIAL shell mkdir -p "$(dirname "$ANDROID_DST")" | 267 $ADB $DEVICE_SERIAL shell mkdir -p "$(dirname "$ANDROID_DST")" |
266 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST | 268 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST |
267 fi | 269 fi |
268 fi | 270 fi |
269 | 271 |
270 # turn error checking back on | 272 # turn error checking back on |
271 set -e | 273 set -e |
272 } | 274 } |
273 | 275 |
274 setup_device "${DEVICE_ID}" | 276 setup_device "${DEVICE_ID}" |
OLD | NEW |