Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Side by Side Diff: platform_tools/android/bin/android_setup.sh

Issue 1774503004: Update android_make to support both --gcc and --clang options. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gyp/lua.gyp ('k') | platform_tools/android/bin/utils/setup_toolchain.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 # Fail-fast if anything in the script fails. 11 # Fail-fast if anything in the script fails.
12 set -e 12 set -e
13 13
14 BUILDTYPE=${BUILDTYPE-Debug} 14 BUILDTYPE=${BUILDTYPE-Debug}
15 USE_CLANG="false"
15 16
16 while (( "$#" )); do 17 while (( "$#" )); do
17 if [[ "$1" == "-d" ]]; then 18 if [[ "$1" == "-d" ]]; then
18 DEVICE_ID=$2 19 DEVICE_ID=$2
19 shift 20 shift
20 elif [[ "$1" == "-i" || "$1" == "--resourcePath" ]]; then 21 elif [[ "$1" == "-i" || "$1" == "--resourcePath" ]]; then
21 RESOURCE_PATH=$2 22 RESOURCE_PATH=$2
22 APP_ARGS=("${APP_ARGS[@]}" "${1}" "${2}") 23 APP_ARGS=("${APP_ARGS[@]}" "${1}" "${2}")
23 shift 24 shift
24 elif [[ "$1" == "-s" ]]; then 25 elif [[ "$1" == "-s" ]]; then
25 DEVICE_SERIAL="-s $2" 26 DEVICE_SERIAL="-s $2"
26 shift 27 shift
27 elif [[ "$1" == "-t" ]]; then 28 elif [[ "$1" == "-t" ]]; then
28 BUILDTYPE=$2 29 BUILDTYPE=$2
29 shift 30 shift
30 elif [[ "$1" == "--release" ]]; then 31 elif [[ "$1" == "--release" ]]; then
31 BUILDTYPE=Release 32 BUILDTYPE=Release
33 elif [[ "$1" == "--gcc" ]]; then
34 USE_CLANG="false"
32 elif [[ "$1" == "--clang" ]]; then 35 elif [[ "$1" == "--clang" ]]; then
33 USE_CLANG="true" 36 #echo "NOTICE: --clang is deprecated now that clang is the default compiler"
mtklein 2016/03/07 18:04:46 Line 15 says USE_CLANG="false"
djsollen 2016/03/07 18:06:23 yeah which is why I commented this line out for no
34 export GYP_DEFINES="skia_clang_build=1 $GYP_DEFINES" 37 USE_CLANG="true"
35 elif [[ "$1" == "--logcat" ]]; then 38 elif [[ "$1" == "--logcat" ]]; then
36 LOGCAT=1 39 LOGCAT=1
37 elif [[ "$1" == "--verbose" ]]; then 40 elif [[ "$1" == "--verbose" ]]; then
38 VERBOSE="true" 41 VERBOSE="true"
39 else 42 else
40 APP_ARGS=("${APP_ARGS[@]}" "${1}") 43 APP_ARGS=("${APP_ARGS[@]}" "${1}")
41 fi 44 fi
42 shift 45 shift
43 done 46 done
44 47
48 if [ "$USE_CLANG" == "true" ]; then
49 export GYP_DEFINES="skia_clang_build=1 $GYP_DEFINES"
50 fi
51
45 function verbose { 52 function verbose {
46 if [[ -n $VERBOSE ]]; then 53 if [[ -n $VERBOSE ]]; then
47 echo $@ 54 echo $@
48 fi 55 fi
49 } 56 }
50 57
51 function exportVar { 58 function exportVar {
52 NAME=$1 59 NAME=$1
53 VALUE=$2 60 VALUE=$2
54 verbose export $NAME=\"$VALUE\" 61 verbose export $NAME=\"$VALUE\"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 adb_push_if_needed $HOST_SRC $ANDROID_DST 259 adb_push_if_needed $HOST_SRC $ANDROID_DST
253 else 260 else
254 echo -n "$ANDROID_DST " 261 echo -n "$ANDROID_DST "
255 $ADB $DEVICE_SERIAL shell mkdir -p "$(dirname "$ANDROID_DST")" 262 $ADB $DEVICE_SERIAL shell mkdir -p "$(dirname "$ANDROID_DST")"
256 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST 263 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST
257 fi 264 fi
258 fi 265 fi
259 } 266 }
260 267
261 setup_device "${DEVICE_ID}" 268 setup_device "${DEVICE_ID}"
OLDNEW
« no previous file with comments | « gyp/lua.gyp ('k') | platform_tools/android/bin/utils/setup_toolchain.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698