mirror of
https://github.com/bensuperpc/dockcross.git
synced 2024-11-10 05:07:26 +01:00
Merge pull request #201 from Nadav-Eyesight/android_arm64
Add Android-arm64
This commit is contained in:
commit
f0986b663b
@ -44,6 +44,25 @@ jobs:
|
||||
- save_cache:
|
||||
key: android-arm-assets-{{ .Revision }}
|
||||
paths: ~/docker/android-arm.tar
|
||||
android-arm64:
|
||||
<<: *build-settings
|
||||
steps:
|
||||
- restore_cache:
|
||||
key: base-assets-{{ .Revision }}
|
||||
- run:
|
||||
name: android-arm64 build
|
||||
no_output_timeout: 1.5h
|
||||
command: |
|
||||
docker load -i ~/docker/base.tar
|
||||
make android-arm64
|
||||
docker save -o ~/docker/android-arm64.tar dockcross/android-arm64:latest
|
||||
- run:
|
||||
name: android-arm64 test
|
||||
command: |
|
||||
make android-arm64.test
|
||||
- save_cache:
|
||||
key: android-arm64-assets-{{ .Revision }}
|
||||
paths: ~/docker/android-arm64.tar
|
||||
browser-asmjs:
|
||||
<<: *build-settings
|
||||
steps:
|
||||
@ -333,6 +352,16 @@ jobs:
|
||||
docker login -u $DOCKER_USER -p $DOCKER_PASS
|
||||
docker push dockcross/android-arm:latest
|
||||
fi
|
||||
- restore_cache:
|
||||
key: android-arm64-assets-{{ .Revision }}
|
||||
- deploy:
|
||||
name: Deploy android-arm64
|
||||
command: |
|
||||
docker load -i ~/docker/android-arm64.tar
|
||||
if [ "${CIRCLE_BRANCH}" == "master" ]; then
|
||||
docker login -u $DOCKER_USER -p $DOCKER_PASS
|
||||
docker push dockcross/android-arm64:latest
|
||||
fi
|
||||
- restore_cache:
|
||||
key: browser-asmjs-assets-{{ .Revision }}
|
||||
- deploy:
|
||||
@ -482,6 +511,9 @@ workflows:
|
||||
- android-arm:
|
||||
requires:
|
||||
- base
|
||||
- android-arm64:
|
||||
requires:
|
||||
- base
|
||||
- browser-asmjs:
|
||||
requires:
|
||||
- base
|
||||
@ -528,6 +560,7 @@ workflows:
|
||||
requires:
|
||||
- base
|
||||
- android-arm
|
||||
- android-arm64
|
||||
- browser-asmjs
|
||||
- linux-arm64
|
||||
- linux-armv5
|
||||
|
2
Makefile
2
Makefile
@ -13,7 +13,7 @@ ORG = dockcross
|
||||
BIN = ./bin
|
||||
|
||||
# These images are built using the "build implicit rule"
|
||||
STANDARD_IMAGES = linux-s390x android-arm linux-x86 linux-x64 linux-arm64 linux-armv5 linux-armv6 linux-armv7 linux-mips linux-mipsel linux-ppc64le windows-x86 windows-x64
|
||||
STANDARD_IMAGES = linux-s390x android-arm android-arm64 linux-x86 linux-x64 linux-arm64 linux-armv5 linux-armv6 linux-armv7 linux-mips linux-mipsel linux-ppc64le windows-x86 windows-x64
|
||||
|
||||
# Generated Dockerfiles.
|
||||
GEN_IMAGES = linux-s390x linux-mips manylinux-x86 manylinux-x64 browser-asmjs
|
||||
|
@ -49,6 +49,13 @@ dockcross/android-arm
|
||||
architecture.
|
||||
|
||||
|
||||
.. |android-arm64-images| image:: https://images.microbadger.com/badges/image/dockcross/android-arm64.svg
|
||||
:target: https://microbadger.com/images/dockcross/android-arm64
|
||||
|
||||
dockcross/android-arm64
|
||||
|android-arm64-images| The Android NDK standalone toolchain for the arm64
|
||||
architecture.
|
||||
|
||||
.. |browser-asmjs-images| image:: https://images.microbadger.com/badges/image/dockcross/browser-asmjs.svg
|
||||
:target: https://microbadger.com/images/dockcross/browser-asmjs
|
||||
|
||||
|
52
android-arm64/Dockerfile
Normal file
52
android-arm64/Dockerfile
Normal file
@ -0,0 +1,52 @@
|
||||
FROM dockcross/base:latest
|
||||
MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
|
||||
RUN dpkg --add-architecture arm64 ; apt-get update
|
||||
|
||||
# The cross-compiling emulator
|
||||
RUN apt-get update && apt-get install -y \
|
||||
qemu-user \
|
||||
qemu-user-static \
|
||||
unzip
|
||||
|
||||
ENV CROSS_TRIPLE=aarch64-linux-android
|
||||
ENV CROSS_ROOT=/usr/${CROSS_TRIPLE}
|
||||
ENV AS=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-as \
|
||||
AR=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-ar \
|
||||
CC=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-clang \
|
||||
CPP=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-cpp \
|
||||
CXX=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-clang++ \
|
||||
LD=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-ld
|
||||
|
||||
ENV ANDROID_NDK_REVISION 16b
|
||||
ENV ANDROID_NDK_API 21
|
||||
RUN mkdir -p /build && \
|
||||
cd /build && \
|
||||
curl -O https://dl.google.com/android/repository/android-ndk-r${ANDROID_NDK_REVISION}-linux-x86_64.zip && \
|
||||
unzip ./android-ndk-r${ANDROID_NDK_REVISION}-linux-x86_64.zip && \
|
||||
cd android-ndk-r${ANDROID_NDK_REVISION} && \
|
||||
./build/tools/make_standalone_toolchain.py \
|
||||
--arch arm64 \
|
||||
--api ${ANDROID_NDK_API} \
|
||||
--stl=libc++ \
|
||||
--install-dir=${CROSS_ROOT} && \
|
||||
cd / && \
|
||||
rm -rf /build && \
|
||||
find ${CROSS_ROOT} -exec chmod a+r '{}' \; && \
|
||||
find ${CROSS_ROOT} -executable -exec chmod a+x '{}' \;
|
||||
|
||||
|
||||
ENV DEFAULT_DOCKCROSS_IMAGE dockcross/android-arm64
|
||||
|
||||
COPY Toolchain.cmake ${CROSS_ROOT}/
|
||||
ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/Toolchain.cmake
|
||||
|
||||
# Build-time metadata as defined at http://label-schema.org
|
||||
ARG BUILD_DATE
|
||||
ARG IMAGE
|
||||
ARG VCS_REF
|
||||
ARG VCS_URL
|
||||
LABEL org.label-schema.build-date=$BUILD_DATE \
|
||||
org.label-schema.name=$IMAGE \
|
||||
org.label-schema.vcs-ref=$VCS_REF \
|
||||
org.label-schema.vcs-url=$VCS_URL \
|
||||
org.label-schema.schema-version="1.0"
|
19
android-arm64/Toolchain.cmake
Normal file
19
android-arm64/Toolchain.cmake
Normal file
@ -0,0 +1,19 @@
|
||||
set(CMAKE_SYSTEM_NAME Android)
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
|
||||
set(cross_triple aarch64-linux-android)
|
||||
set(CMAKE_ANDROID_STANDALONE_TOOLCHAIN /usr/${cross_triple}/)
|
||||
set(CMAKE_ANDROID_ARM_MODE 1)
|
||||
set(CMAKE_ANDROID_ARM_NEON 1)
|
||||
|
||||
set(CMAKE_C_COMPILER /usr/${cross_triple}/bin/${cross_triple}-clang)
|
||||
set(CMAKE_CXX_COMPILER /usr/${cross_triple}/bin/${cross_triple}-clang++)
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH /usr/${cross_triple})
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
set(CMAKE_SYSROOT /usr/${cross_triple}/sysroot)
|
||||
|
||||
set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-arm)
|
||||
|
Loading…
Reference in New Issue
Block a user