-
-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docker: build linux/arm64 images (#398)
- Loading branch information
1 parent
6775203
commit becddc3
Showing
3 changed files
with
83 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ | |
/libffi | ||
/cpython* | ||
/python-native | ||
/toolchain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
FROM ubuntu:20.04 | ||
|
||
RUN apt-get update -qq && \ | ||
DEBIAN_FRONTEND="noninteractive" apt-get install -qqy --no-install-recommends \ | ||
git wget bzip2 file unzip libtool pkg-config cmake build-essential \ | ||
automake yasm gettext autopoint vim-tiny python3 python3-distutils \ | ||
ninja-build ca-certificates curl less zip && \ | ||
apt-get clean -y && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Manually install a newer version of CMake; this is needed since building | ||
# LLVM requires CMake 3.20, while Ubuntu 20.04 ships with 3.16.3. If | ||
# updating to a newer distribution, this can be dropped. | ||
RUN cd /opt && \ | ||
curl -LO https://github.com/Kitware/CMake/releases/download/v3.26.4/cmake-3.26.4-Linux-$(uname -m).tar.gz && \ | ||
tar -zxf cmake-*.tar.gz && \ | ||
rm cmake-*.tar.gz && \ | ||
mv cmake-* cmake | ||
ENV PATH=/opt/cmake/bin:$PATH | ||
|
||
|
||
RUN git config --global user.name "LLVM MinGW" && \ | ||
git config --global user.email root@localhost | ||
|
||
WORKDIR /build | ||
|
||
ENV TOOLCHAIN_PREFIX=/opt/llvm-mingw | ||
|
||
ARG TOOLCHAIN_ARCHS="i686 x86_64 armv7 aarch64" | ||
|
||
# Copy prebuild toolchains for the current architecture | ||
RUN --mount=type=bind,source=toolchain,target=/toolchain \ | ||
mkdir -p $TOOLCHAIN_PREFIX && ARCH=`uname -m` && \ | ||
tar xf /toolchain/llvm-mingw-*-$ARCH.tar.xz --strip-components 1 -C $TOOLCHAIN_PREFIX | ||
|
||
ENV PATH=$TOOLCHAIN_PREFIX/bin:$PATH |