mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-24 05:15:22 +02:00
Switch to LLVM-based MinGW toolchain (#14329)
This commit is contained in:
@@ -1,18 +1,17 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
topdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
if [[ -z "$1" || -z "$2" ]]; then
|
||||
echo "Usage: $0 <i686 | x86_64> <dest path>"
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage: $0 <dest path>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# our current toolchain:
|
||||
# binutils 2.41 + GCC 13.2.0 + Mingw-w64 11.0.1 with UCRT enabled and winpthreads support
|
||||
# built from source on Ubuntu 22.04, so should work on any similarily up-to-date distro
|
||||
ver=13.2.0
|
||||
os=ubuntu22.04
|
||||
name="mingw-w64-${1}_${ver}_${os}.tar.xz"
|
||||
wget "http://minetest.kitsunemimi.pw/$name" -O "$name"
|
||||
# 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
|
||||
name=llvm-mingw-20231128-ucrt-ubuntu-20.04-x86_64.tar.xz
|
||||
wget "https://github.com/mstorsjo/llvm-mingw/releases/download/20231128/$name" -O "$name"
|
||||
sha256sum -w -c <(grep -F "$name" "$topdir/sha256sums.txt")
|
||||
tar -xaf "$name" -C "$2"
|
||||
tar -xaf "$name" -C "$1" --strip-components=1
|
||||
rm -f "$name"
|
||||
|
||||
Reference in New Issue
Block a user