OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 # | 2 # |
3 # android_setup.sh: Sets environment variables used by other Android scripts. | 3 # android_setup.sh: Sets environment variables used by other Android scripts. |
4 | 4 |
5 # Fail-fast if anything in the script fails. | 5 # Fail-fast if anything in the script fails. |
6 set -e | 6 set -e |
7 | 7 |
8 BUILDTYPE=${BUILDTYPE-Debug} | 8 BUILDTYPE=${BUILDTYPE-Debug} |
9 | 9 |
10 while (( "$#" )); do | 10 while (( "$#" )); do |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 galaxy_nexus) | 109 galaxy_nexus) |
110 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=1 arm_version=7 arm_thumb=
1" | 110 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=1 arm_version=7 arm_thumb=
1" |
111 DEFINES="${DEFINES} skia_resource_cache_mb_limit=32" | 111 DEFINES="${DEFINES} skia_resource_cache_mb_limit=32" |
112 ANDROID_ARCH="arm" | 112 ANDROID_ARCH="arm" |
113 ;; | 113 ;; |
114 intel_rhb | razr_i | x86) | 114 intel_rhb | razr_i | x86) |
115 DEFINES="${DEFINES} skia_arch_type=x86 skia_arch_width=32" | 115 DEFINES="${DEFINES} skia_arch_type=x86 skia_arch_width=32" |
116 DEFINES="${DEFINES} skia_resource_cache_mb_limit=32" | 116 DEFINES="${DEFINES} skia_resource_cache_mb_limit=32" |
117 ANDROID_ARCH="x86" | 117 ANDROID_ARCH="x86" |
118 ;; | 118 ;; |
| 119 x86_64 | x64) |
| 120 DEFINES="${DEFINES} skia_arch_type=x86 skia_arch_width=64" |
| 121 ANDROID_ARCH="x86_64" |
| 122 ;; |
119 arm_v7) | 123 arm_v7) |
120 DEFINES="${DEFINES} skia_arch_type=arm arm_neon_optional=1 arm_version=7 a
rm_thumb=0" | 124 DEFINES="${DEFINES} skia_arch_type=arm arm_neon_optional=1 arm_version=7 a
rm_thumb=0" |
121 ANDROID_ARCH="arm" | 125 ANDROID_ARCH="arm" |
122 ;; | 126 ;; |
123 arm_v7_thumb | nvidia_logan) | 127 arm_v7_thumb | nvidia_logan) |
124 DEFINES="${DEFINES} skia_arch_type=arm arm_neon_optional=1 arm_version=7 a
rm_thumb=1" | 128 DEFINES="${DEFINES} skia_arch_type=arm arm_neon_optional=1 arm_version=7 a
rm_thumb=1" |
125 ANDROID_ARCH="arm" | 129 ANDROID_ARCH="arm" |
126 ;; | 130 ;; |
127 arm) | 131 arm) |
128 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=0 arm_thumb=0" | 132 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=0 arm_thumb=0" |
129 ANDROID_ARCH="arm" | 133 ANDROID_ARCH="arm" |
130 ;; | 134 ;; |
131 arm_thumb) | 135 arm_thumb) |
132 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=0 arm_thumb=1" | 136 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=0 arm_thumb=1" |
133 ANDROID_ARCH="arm" | 137 ANDROID_ARCH="arm" |
134 ;; | 138 ;; |
| 139 arm64) |
| 140 DEFINES="${DEFINES} skia_arch_type=arm64 skia_arch_width=64" |
| 141 ANDROID_ARCH="arm64" |
| 142 ;; |
135 mips) | 143 mips) |
136 DEFINES="${DEFINES} skia_arch_type=mips skia_arch_width=32" | 144 DEFINES="${DEFINES} skia_arch_type=mips skia_arch_width=32" |
137 DEFINES="${DEFINES} skia_resource_cache_mb_limit=32" | 145 DEFINES="${DEFINES} skia_resource_cache_mb_limit=32" |
138 ANDROID_ARCH="mips" | 146 ANDROID_ARCH="mips" |
139 ;; | 147 ;; |
| 148 mips64) |
| 149 DEFINES="${DEFINES} skia_arch_type=mips skia_arch_width=64" |
| 150 ANDROID_ARCH="mips64" |
| 151 ;; |
140 *) | 152 *) |
141 if [ -z "$ANDROID_IGNORE_UNKNOWN_DEVICE" ]; then | 153 if [ -z "$ANDROID_IGNORE_UNKNOWN_DEVICE" ]; then |
142 echo "ERROR: unknown device $TARGET_DEVICE" | 154 echo "ERROR: unknown device $TARGET_DEVICE" |
143 exit 1 | 155 exit 1 |
144 fi | 156 fi |
145 # If ANDROID_IGNORE_UNKNOWN_DEVICE is set, then ANDROID_TOOLCHAIN | 157 # If ANDROID_IGNORE_UNKNOWN_DEVICE is set, then ANDROID_TOOLCHAIN |
146 # or ANDROID_ARCH should be set; Otherwise, ANDROID_ARCH | 158 # or ANDROID_ARCH should be set; Otherwise, ANDROID_ARCH |
147 # defaults to 'arm' and the default ARM toolchain is used. | 159 # defaults to 'arm' and the default ARM toolchain is used. |
148 DEFINES="${DEFINES} skia_arch_type=${ANDROID_ARCH-arm}" | 160 DEFINES="${DEFINES} skia_arch_type=${ANDROID_ARCH-arm}" |
149 # If ANDROID_IGNORE_UNKNOWN_DEVICE is set, extra gyp defines can be | 161 # If ANDROID_IGNORE_UNKNOWN_DEVICE is set, extra gyp defines can be |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 adb_push_if_needed $HOST_SRC $ANDROID_DST | 257 adb_push_if_needed $HOST_SRC $ANDROID_DST |
246 else | 258 else |
247 echo -n "$ANDROID_DST " | 259 echo -n "$ANDROID_DST " |
248 $ADB $DEVICE_SERIAL shell mkdir -p "$(dirname "$ANDROID_DST")" | 260 $ADB $DEVICE_SERIAL shell mkdir -p "$(dirname "$ANDROID_DST")" |
249 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST | 261 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST |
250 fi | 262 fi |
251 fi | 263 fi |
252 } | 264 } |
253 | 265 |
254 setup_device "${DEVICE_ID}" | 266 setup_device "${DEVICE_ID}" |
OLD | NEW |