File tree Expand file tree Collapse file tree 4 files changed +11
-39
lines changed Expand file tree Collapse file tree 4 files changed +11
-39
lines changed Original file line number Diff line number Diff line change @@ -6,36 +6,7 @@ NDK=android-ndk-r21d
6
6
wget --tries=20 -q https://dl.google.com/android/repository/${NDK} -linux-x86_64.zip
7
7
unzip -q ${NDK} -linux-x86_64.zip
8
8
9
- case " $1 " in
10
- arm)
11
- arch=arm
12
- api=28
13
- ;;
14
- armv7)
15
- arch=arm
16
- api=28
17
- ;;
18
- aarch64)
19
- arch=arm64
20
- api=28
21
- ;;
22
- i686)
23
- arch=x86
24
- api=28
25
- ;;
26
- x86_64)
27
- arch=x86_64
28
- api=28
29
- ;;
30
- * )
31
- echo " invalid arch: $1 "
32
- exit 1
33
- ;;
34
- esac ;
35
-
36
- python3 ${NDK} /build/tools/make_standalone_toolchain.py \
37
- --install-dir " /android/ndk-${1} " \
38
- --arch " ${arch} " \
39
- --api ${api}
9
+ mkdir -p /android/ndk-${1} /bin
10
+ mv ${NDK} /toolchains/llvm/prebuilt/linux-x86_64/bin/* /android/ndk-${1} /bin
40
11
41
12
rm -rf ./${NDK} -linux-x86_64.zip ./${NDK}
Original file line number Diff line number Diff line change @@ -28,9 +28,9 @@ RUN chmod 777 -R /tmp/.android
28
28
RUN chmod 755 /android/sdk/cmdline-tools/tools/* /android/sdk/emulator/qemu/linux-x86_64/*
29
29
30
30
ENV PATH=$PATH:/rust/bin \
31
- CARGO_TARGET_ARM_LINUX_ANDROIDEABI_LINKER=arm -linux-androideabi-gcc \
31
+ CARGO_TARGET_ARM_LINUX_ANDROIDEABI_LINKER=armv7a -linux-androideabi28-clang \
32
32
CARGO_TARGET_ARM_LINUX_ANDROIDEABI_RUNNER=/tmp/runtest \
33
- CC_arm_linux_androideabi=arm -linux-androideabi-gcc \
33
+ CC_arm_linux_androideabi=armv7a -linux-androideabi28-clang \
34
34
HOME=/tmp
35
35
36
36
ADD runtest-android.rs /tmp/runtest.rs
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ FROM ubuntu:22.04
2
2
3
3
RUN dpkg --add-architecture i386
4
4
RUN apt-get update
5
- RUN apt-get install -y --no-install-recommends libc6- dev gcc
5
+ RUN apt-get install -y --no-install-recommends linux-libc- dev:i386 gcc
6
6
RUN apt-get install -y --no-install-recommends \
7
7
file \
8
8
wget \
@@ -12,7 +12,8 @@ RUN apt-get install -y --no-install-recommends \
12
12
unzip \
13
13
expect \
14
14
openjdk-8-jre \
15
- libstdc++6:i386 \
15
+ libstdc++-10-dev:i386 \
16
+ libc++-dev:i386 \
16
17
libpulse0
17
18
18
19
WORKDIR /android/
@@ -28,9 +29,9 @@ RUN chmod 777 -R /tmp/.android
28
29
RUN chmod 755 /android/sdk/cmdline-tools/tools/* /android/sdk/emulator/qemu/linux-x86_64/*
29
30
30
31
ENV PATH=$PATH:/rust/bin \
31
- CARGO_TARGET_I686_LINUX_ANDROID_LINKER=i686-linux-android-gcc \
32
+ CARGO_TARGET_I686_LINUX_ANDROID_LINKER=i686-linux-android28-clang \
32
33
CARGO_TARGET_I686_LINUX_ANDROID_RUNNER=/tmp/runtest \
33
- CC_i686_linux_android=i686-linux-android-gcc \
34
+ CC_i686_linux_android=i686-linux-android28-clang \
34
35
HOME=/tmp
35
36
36
37
ADD runtest-android.rs /tmp/runtest.rs
Original file line number Diff line number Diff line change 2
2
#include <sys/socket.h>
3
3
4
4
// Since the cmsg(3) macros are macros instead of functions, they aren't
5
- // available to FFI. libc must reimplement them, which is error-prone. This
5
+ // available to FFI. libc must reimplement them, which is error-prone. This
6
6
// file provides FFI access to the actual macros so they can be tested against
7
- // the Rust reimplementations .
7
+ // the Rust re-implementation .
8
8
9
9
struct cmsghdr * cmsg_firsthdr (struct msghdr * msgh ) {
10
10
return CMSG_FIRSTHDR (msgh );
You can’t perform that action at this time.
0 commit comments