release: Add an option for only building a native toolchain

This commit is contained in:
Martin Storsjö committed 2021-04-23 10:58:42 +03:00
1 parent 2094638569
commit 869b038152
1 file changed
+11 -2
+11 -2
View File
@@ -17,18 +17,27 @@
set -ex
if [ $# -lt 1 ]; then
echo $0 tag
echo $0 tag [nativeonly]
exit 1
fi
TAG=$1
if [ "$2" = "nativeonly" ]; then
NATIVEONLY=1
fi
time docker build -f Dockerfile . -t mstorsjo/llvm-mingw:latest -t mstorsjo/llvm-mingw:$TAG
time docker build -f Dockerfile.dev . -t mstorsjo/llvm-mingw:dev -t mstorsjo/llvm-mingw:dev-$TAG
DISTRO=ubuntu-18.04
docker run --rm mstorsjo/llvm-mingw:latest sh -c "cd /opt && mv llvm-mingw llvm-mingw-$TAG-ucrt-$DISTRO && tar -Jcvf - llvm-mingw-$TAG-ucrt-$DISTRO" > llvm-mingw-$TAG-ucrt-$DISTRO.tar.xz
if [ -n "$NATIVEONLY" ]; then
exit 0
fi
time docker build -f Dockerfile.dev . -t mstorsjo/llvm-mingw:dev -t mstorsjo/llvm-mingw:dev-$TAG
cleanup() {
for i in $temp_images; do
docker rmi --no-prune $i || true