2023-12-13 00:19:11 +01:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
topdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
2024-02-16 21:36:19 +01:00
|
|
|
if [ -z "$1" ]; then
|
|
|
|
echo "Usage: $0 <dest path>"
|
2023-12-13 00:19:11 +01:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2024-02-16 21:36:19 +01:00
|
|
|
# key points:
|
|
|
|
# * Clang + LLD + libc++ instead of GCC + binutils + stdc++
|
|
|
|
# * Mingw-w64 with UCRT enabled and winpthreads support
|
|
|
|
# why are we avoiding GCC? -> Thread Local Storage (TLS) is totally broken
|
2024-09-11 16:40:58 +02:00
|
|
|
date=20240619
|
|
|
|
name=llvm-mingw-${date}-ucrt-ubuntu-20.04-x86_64.tar.xz
|
|
|
|
wget "https://github.com/mstorsjo/llvm-mingw/releases/download/$date/$name" -O "$name"
|
2023-12-13 00:19:11 +01:00
|
|
|
sha256sum -w -c <(grep -F "$name" "$topdir/sha256sums.txt")
|
2024-02-16 21:36:19 +01:00
|
|
|
tar -xaf "$name" -C "$1" --strip-components=1
|
2023-12-13 00:19:11 +01:00
|
|
|
rm -f "$name"
|