2
0

download_toolchain.sh 623 B

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