Skip to content

Commit 156678f

Browse files
committed
Auto merge of #1086 - malbarbo:android-x86_64, r=brson
Add x86_64-linux-android target
2 parents a1c6be1 + a983f32 commit 156678f

File tree

7 files changed

+68
-41
lines changed

7 files changed

+68
-41
lines changed

.travis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ matrix:
9191
env: TARGET=i686-linux-android
9292
DOCKER=android
9393
SKIP_TESTS=1
94+
- os: linux
95+
env: TARGET=x86_64-linux-android
96+
DOCKER=android
97+
SKIP_TESTS=1
9498

9599
# On OSX we want to target 10.7 so we ensure that the appropriate
96100
# environment variable is set to tell the linker what we want.
@@ -122,7 +126,7 @@ install:
122126
- sudo pip install awscli
123127
- aws configure set preview.cloudfront true
124128
- curl https://static.rust-lang.org/rustup.sh |
125-
sh -s -- --prefix=$HOME/rust --spec=nightly-2016-11-06 --with-target=$TARGET
129+
sh -s -- --prefix=$HOME/rust --spec=nightly-2017-04-25 --with-target=$TARGET
126130

127131
script:
128132
- mkdir -p target/$TARGET

Cargo.lock

Lines changed: 45 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,7 @@ platform of your choice:
532532
- [i686-linux-android](https://static.rust-lang.org/rustup/dist/i686-linux-android/rustup-init)
533533
- [i686-unknown-linux-gnu](https://static.rust-lang.org/rustup/dist/i686-unknown-linux-gnu/rustup-init)
534534
- [x86_64-apple-darwin](https://static.rust-lang.org/rustup/dist/x86_64-apple-darwin/rustup-init)
535+
- [x86_64-linux-android](https://static.rust-lang.org/rustup/dist/x86_64-linux-android/rustup-init)
535536
- [x86_64-pc-windows-gnu](https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-gnu/rustup-init.exe)
536537
- [x86_64-pc-windows-msvc](https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe)<sup>[](#vs2015)</sup>
537538
- [x86_64-unknown-freebsd](https://static.rust-lang.org/rustup/dist/x86_64-unknown-freebsd/rustup-init)

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ install:
4444
4545
# Install rust, x86_64-pc-windows-msvc host
4646
- appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
47-
- rustup-init.exe -y --default-toolchain=nightly-2017-01-06-x86_64-pc-windows-msvc
47+
- rustup-init.exe -y --default-toolchain=nightly-2017-04-25-x86_64-pc-windows-msvc
4848
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
4949

5050
# Install the target we're compiling for

ci/docker/android/Dockerfile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,16 @@ RUN apt-get install -y --no-install-recommends \
2727
--install-dir /android-ndk/x86 \
2828
--arch x86 \
2929
--api 21 && \
30+
./android-ndk-r13b/build/tools/make_standalone_toolchain.py \
31+
--install-dir /android-ndk/x86_64 \
32+
--arch x86_64 \
33+
--api 21 && \
3034
rm -rf ./android-ndk-r13b-linux-x86_64.zip ./android-ndk-r13b && \
3135
apt-get purge --auto-remove -y unzip python
3236

33-
ENV PATH=$PATH:/android-ndk/arm/bin:/android-ndk/arm64/bin:/android-ndk/x86/bin
37+
ENV PATH=$PATH:/android-ndk/arm/bin
38+
ENV PATH=$PATH:/android-ndk/arm64/bin
39+
ENV PATH=$PATH:/android-ndk/x86/bin
40+
ENV PATH=$PATH:/android-ndk/x86_64/bin
3441

3542
WORKDIR /buildslave

ci/run-docker.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ case $TARGET in
6767
OPENSSL_OS=android-x86
6868
OPENSSL_CC=i686-linux-android-gcc
6969
OPENSSL_AR=i686-linux-android-ar
70+
OPENSSL_CFLAGS=no-asm
71+
;;
72+
x86_64-linux-android)
73+
OPENSSL_OS=linux-x86_64
74+
OPENSSL_CC=x86_64-linux-android-gcc
75+
OPENSSL_AR=x86_64-linux-android-ar
76+
OPENSSL_CFLAGS="no-asm -mandroid -fomit-frame-pointer"
7077
;;
7178
arm-*-linux-gnueabi)
7279
OPENSSL_OS=linux-armv4

src/rustup-dist/src/dist.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ impl TargetTriple {
166166
(_, b"armv8l") if cfg!(target_os = "android") => Some("armv7-linux-androideabi"),
167167
(_, b"aarch64") if cfg!(target_os = "android") => Some("aarch64-linux-android"),
168168
(_, b"i686") if cfg!(target_os = "android") => Some("i686-linux-android"),
169+
(_, b"x86_64") if cfg!(target_os = "android") => Some("x86_64-linux-android"),
169170
(b"Linux", b"x86_64") => Some("x86_64-unknown-linux-gnu"),
170171
(b"Linux", b"i686") => Some("i686-unknown-linux-gnu"),
171172
(b"Linux", b"mips") => Some(TRIPLE_MIPS_UNKNOWN_LINUX_GNU),

0 commit comments

Comments
 (0)