2
0

download_toolchain.sh 613 B

1234567891011121314151617
  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. name=llvm-mingw-20231128-ucrt-ubuntu-20.04-x86_64.tar.xz
  13. wget "https://github.com/mstorsjo/llvm-mingw/releases/download/20231128/$name" -O "$name"
  14. sha256sum -w -c <(grep -F "$name" "$topdir/sha256sums.txt")
  15. tar -xaf "$name" -C "$1" --strip-components=1
  16. rm -f "$name"