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

Side by Side Diff: platform_tools/android/bin/utils/setup_toolchain.sh

Issue 2140603002: ndk: r11c -> r12b (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 Google Inc. 1 # Copyright 2015 Google Inc.
2 # 2 #
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 #!/bin/bash 6 #!/bin/bash
7 # 7 #
8 # setup_toolchain.sh: Sets toolchain environment variables used by other scripts . 8 # setup_toolchain.sh: Sets toolchain environment variables used by other scripts .
9 9
10 # Fail-fast if anything in the script fails. 10 # Fail-fast if anything in the script fails.
(...skipping 17 matching lines...) Expand all
28 28
29 if [ -z "$SCRIPT_DIR" ]; then 29 if [ -z "$SCRIPT_DIR" ]; then
30 echo "ERROR: The SCRIPT_DIR variable is expected to be defined" 30 echo "ERROR: The SCRIPT_DIR variable is expected to be defined"
31 return 1 31 return 1
32 fi 32 fi
33 33
34 function default_toolchain() { 34 function default_toolchain() {
35 TOOLCHAINS=${SCRIPT_DIR}/../toolchains 35 TOOLCHAINS=${SCRIPT_DIR}/../toolchains
36 36
37 ANDROID_ARCH=${ANDROID_ARCH-arm} 37 ANDROID_ARCH=${ANDROID_ARCH-arm}
38 NDK=r11c 38 NDK=r12b
39 39
40 if [[ $ANDROID_ARCH == *64* ]]; then 40 if [[ $ANDROID_ARCH == *64* ]]; then
41 API=21 # Android 5.0 41 API=21 # Android 5.0
42 else 42 else
43 API=14 # Android 4.0 43 API=14 # Android 4.0
44 fi 44 fi
45 45
46 if [ "$SKIA_VULKAN" == "true" ]; then 46 if [ "$SKIA_VULKAN" == "true" ]; then
47 API=24 # Android N Preview 47 API=24 # Android N Preview
48 fi 48 fi
49 49
50 TOOLCHAIN=$ANDROID_ARCH-$NDK-$API 50 TOOLCHAIN=$ANDROID_ARCH-$NDK-$API
51 HOST=`uname | tr '[A-Z]' '[a-z]'` 51 HOST=`uname | tr '[A-Z]' '[a-z]'`
52 52
53 exportVar ANDROID_TOOLCHAIN "${TOOLCHAINS}/${TOOLCHAIN}" 53 exportVar ANDROID_TOOLCHAIN "${TOOLCHAINS}/${TOOLCHAIN}"
54 54
55 if [ ! -d "$ANDROID_TOOLCHAIN" ]; then 55 if [ ! -d "$ANDROID_TOOLCHAIN" ]; then
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 # Create symlinks for nm & readelf and add them to the path so that the ninja 147 # Create symlinks for nm & readelf and add them to the path so that the ninja
148 # build uses them instead of attempting to use the one on the system. 148 # build uses them instead of attempting to use the one on the system.
149 # This is required to build using ninja on a Mac. 149 # This is required to build using ninja on a Mac.
150 if [ $HOST == "darwin" ]; then 150 if [ $HOST == "darwin" ]; then
151 ln -sf $ANDROID_TOOLCHAIN_PREFIX-nm $ANDROID_TOOLCHAIN/bin/nm 151 ln -sf $ANDROID_TOOLCHAIN_PREFIX-nm $ANDROID_TOOLCHAIN/bin/nm
152 ln -sf $ANDROID_TOOLCHAIN_PREFIX-readelf $ANDROID_TOOLCHAIN/bin/readelf 152 ln -sf $ANDROID_TOOLCHAIN_PREFIX-readelf $ANDROID_TOOLCHAIN/bin/readelf
153 ln -sf $ANDROID_TOOLCHAIN_PREFIX-as $ANDROID_TOOLCHAIN/bin/as 153 ln -sf $ANDROID_TOOLCHAIN_PREFIX-as $ANDROID_TOOLCHAIN/bin/as
154 fi 154 fi
155 155
156 exportVar PATH ${ANDROID_TOOLCHAIN}/bin:${PATH} 156 exportVar PATH ${ANDROID_TOOLCHAIN}/bin:${PATH}
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698