diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 06ba801..29b03e1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -54,7 +54,7 @@ jobs: linux-mips, linux-ppc64le, web-wasm, manylinux2014-x64, manylinux2014-x86, windows-static-x64, windows-static-x64-posix, windows-static-x86, - windows-shared-x64, windows-shared-x64-posix, windows-shared-x86, + windows-shared-x64, windows-shared-x64-posix, windows-shared-x86, windows-arm64, linux-riscv64, linux-riscv32, linux-m68k-uclibc, linux-xtensa-uclibc] steps: - uses: actions/checkout@v2 diff --git a/Makefile b/Makefile index dea92dc..e8f68e7 100644 --- a/Makefile +++ b/Makefile @@ -20,13 +20,13 @@ STANDARD_IMAGES = android-arm android-arm64 android-x86 android-x86_64 \ linux-armv7l-musl linux-armv7 linux-armv7a \ linux-mips linux-ppc64le linux-riscv64 linux-riscv32 linux-xtensa-uclibc \ windows-static-x86 windows-static-x64 windows-static-x64-posix \ - windows-shared-x86 windows-shared-x64 windows-shared-x64-posix + windows-shared-x86 windows-shared-x64 windows-shared-x64-posix windows-arm64 # Generated Dockerfiles. GEN_IMAGES = android-arm android-arm64 \ linux-x86 linux-x64 linux-x64-clang linux-arm64 linux-arm64-musl linux-arm64-full \ manylinux2014-x64 manylinux2014-x86 \ - web-wasm linux-mips \ + web-wasm linux-mips windows-arm64 \ windows-static-x86 windows-static-x64 windows-static-x64-posix \ windows-shared-x86 windows-shared-x64 windows-shared-x64-posix \ linux-armv7 linux-armv7a linux-armv7l-musl \ diff --git a/windows-arm64/Dockerfile.in b/windows-arm64/Dockerfile.in new file mode 100644 index 0000000..91025ac --- /dev/null +++ b/windows-arm64/Dockerfile.in @@ -0,0 +1,31 @@ +FROM dockcross/base:latest +MAINTAINER Matt McCormick "matt.mccormick@kitware.com" + + + +ENV XCC_PREFIX /usr/xcc +ENV CROSS_TRIPLE aarch64-w64-mingw32 +ENV CROSS_ROOT ${XCC_PREFIX}/${CROSS_TRIPLE}-cross + +ARG DOWNLOAD_URL=https://github.com/mstorsjo/llvm-mingw/releases/download/20210423/llvm-mingw-20210423-msvcrt-ubuntu-18.04-x86_64.tar.xz +ENV DOWNLOAD_URL=${DOWNLOAD_URL} + +RUN mkdir -p ${CROSS_ROOT} && wget -qO- "${DOWNLOAD_URL}" | tar xJvf - --strip 1 -C ${CROSS_ROOT}/ > /dev/null + +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 \ + FC=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-gfortran + +COPY Toolchain.cmake ${CROSS_ROOT}/ +ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/Toolchain.cmake + +# Linux kernel cross compilation variables +ENV PATH ${PATH}:${CROSS_ROOT}/bin +ENV CROSS_COMPILE ${CROSS_TRIPLE}- +ENV ARCH arm64 + +#include "common.label-and-env" diff --git a/windows-arm64/Toolchain.cmake b/windows-arm64/Toolchain.cmake new file mode 100644 index 0000000..3dd8e62 --- /dev/null +++ b/windows-arm64/Toolchain.cmake @@ -0,0 +1,17 @@ +set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_SYSTEM_VERSION 1) +set(CMAKE_SYSTEM_PROCESSOR aarch64) + +set(cross_triple $ENV{CROSS_TRIPLE}) +set(cross_root $ENV{CROSS_ROOT}) + +set(CMAKE_C_COMPILER $ENV{CC}) +set(CMAKE_CXX_COMPILER $ENV{CXX}) +set(CMAKE_Fortran_COMPILER $ENV{FC}) + +set(CMAKE_CXX_FLAGS "-I ${cross_root}/include/") + +set(CMAKE_FIND_ROOT_PATH ${cross_root} ${cross_root}/${cross_triple}) +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)