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

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

Issue 1903253003: VulkanViewer on Android (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: gyp Created 4 years, 8 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
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 24 matching lines...) Expand all
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=r11c
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
46 if [ "$SKIA_VULKAN" == "true" ]; then
47 API=24 # Android N Preview
48 fi
45 49
46 TOOLCHAIN=$ANDROID_ARCH-$NDK-$API 50 TOOLCHAIN=$ANDROID_ARCH-$NDK-$API
47 HOST=`uname | tr '[A-Z]' '[a-z]'` 51 HOST=`uname | tr '[A-Z]' '[a-z]'`
48 52
49 exportVar ANDROID_TOOLCHAIN "${TOOLCHAINS}/${TOOLCHAIN}" 53 exportVar ANDROID_TOOLCHAIN "${TOOLCHAINS}/${TOOLCHAIN}"
50 54
51 if [ ! -d "$ANDROID_TOOLCHAIN" ]; then 55 if [ ! -d "$ANDROID_TOOLCHAIN" ]; then
52 mkdir -p $TOOLCHAINS 56 mkdir -p $TOOLCHAINS
53 pushd $TOOLCHAINS 57 pushd $TOOLCHAINS
54 curl -o $NDK.zip https://dl.google.com/android/repository/android-ndk-$NDK-$ HOST-x86_64.zip 58 curl -o $NDK.zip https://dl.google.com/android/repository/android-ndk-$NDK-$ HOST-x86_64.zip
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 # 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
144 # 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.
145 # This is required to build using ninja on a Mac. 149 # This is required to build using ninja on a Mac.
146 if [ $(uname) == "Darwin" ]; then 150 if [ $(uname) == "Darwin" ]; then
147 ln -sf $ANDROID_TOOLCHAIN_PREFIX-nm $ANDROID_TOOLCHAIN/nm 151 ln -sf $ANDROID_TOOLCHAIN_PREFIX-nm $ANDROID_TOOLCHAIN/nm
148 ln -sf $ANDROID_TOOLCHAIN_PREFIX-readelf $ANDROID_TOOLCHAIN/readelf 152 ln -sf $ANDROID_TOOLCHAIN_PREFIX-readelf $ANDROID_TOOLCHAIN/readelf
149 ln -sf $ANDROID_TOOLCHAIN_PREFIX-as $ANDROID_TOOLCHAIN/as 153 ln -sf $ANDROID_TOOLCHAIN_PREFIX-as $ANDROID_TOOLCHAIN/as
150 fi 154 fi
151 155
152 exportVar PATH ${ANDROID_TOOLCHAIN}/bin:${PATH} 156 exportVar PATH ${ANDROID_TOOLCHAIN}/bin:${PATH}
OLDNEW
« no previous file with comments | « platform_tools/android/bin/android_setup.sh ('k') | platform_tools/android/gyp/skia_android.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698