]> git.lizzy.rs Git - rust.git/blob - src/ci/docker/dist-android/install-ndk.sh
Add x86_64-linux-android target
[rust.git] / src / ci / docker / dist-android / install-ndk.sh
1 #!/bin/sh
2 # Copyright 2016 The Rust Project Developers. See the COPYRIGHT
3 # file at the top-level directory of this distribution and at
4 # http://rust-lang.org/COPYRIGHT.
5 #
6 # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
7 # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
8 # <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
9 # option. This file may not be copied, modified, or distributed
10 # except according to those terms.
11
12 set -ex
13
14 # Prep the Android NDK
15 #
16 # See https://github.com/servo/servo/wiki/Building-for-Android
17 curl -O https://dl.google.com/android/repository/android-ndk-r11c-linux-x86_64.zip
18 unzip -q android-ndk-r11c-linux-x86_64.zip
19 bash android-ndk-r11c/build/tools/make-standalone-toolchain.sh \
20         --platform=android-9 \
21         --toolchain=arm-linux-androideabi-4.9 \
22         --install-dir=/android/ndk-arm-9 \
23         --ndk-dir=/android/android-ndk-r11c \
24         --arch=arm
25 bash android-ndk-r11c/build/tools/make-standalone-toolchain.sh \
26         --platform=android-21 \
27         --toolchain=aarch64-linux-android-4.9 \
28         --install-dir=/android/ndk-arm64-21 \
29         --ndk-dir=/android/android-ndk-r11c \
30         --arch=arm64
31 bash android-ndk-r11c/build/tools/make-standalone-toolchain.sh \
32         --platform=android-9 \
33         --toolchain=x86-4.9 \
34         --install-dir=/android/ndk-x86-9 \
35         --ndk-dir=/android/android-ndk-r11c \
36         --arch=x86
37 bash android-ndk-r11c/build/tools/make-standalone-toolchain.sh \
38         --platform=android-21 \
39         --toolchain=x86_64-4.9 \
40         --install-dir=/android/ndk-x86_64-21 \
41         --ndk-dir=/android/android-ndk-r11c \
42         --arch=x86_64
43
44 rm -rf ./android-ndk-r11c-linux-x86_64.zip ./android-ndk-r11c