1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-15 18:57:08 +00:00

Switch to LLVM-based MinGW toolchain (#14329)

This commit is contained in:
sfan5 2024-02-16 21:36:19 +01:00 committed by GitHub
parent 8c3a6a819e
commit f483d10c95
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 110 additions and 147 deletions

View file

@ -13,42 +13,36 @@ libdir=$builddir/libs
source $topdir/common.sh
# Test which win32 compiler is present
command -v i686-w64-mingw32-gcc >/dev/null &&
compiler=i686-w64-mingw32-gcc
command -v i686-w64-mingw32-gcc-posix >/dev/null &&
compiler=i686-w64-mingw32-gcc-posix
compiler=i686-w64-mingw32-clang
if [ -z "$compiler" ]; then
echo "Unable to determine which MinGW compiler to use"
if ! command -v "$compiler" >/dev/null; then
echo "Unable to find $compiler"
exit 1
fi
toolchain_file=$topdir/toolchain_${compiler/-gcc/}.cmake
toolchain_file=$topdir/toolchain_${compiler%-*}.cmake
echo "Using $toolchain_file"
find_runtime_dlls i686-w64-mingw32
find_runtime_dlls ${compiler%-*}
# Get stuff
irrlicht_version=$(cat $topdir/../../misc/irrlichtmt_tag.txt)
mkdir -p $libdir
# 'ucrt' just points to rebuilt versions after a toolchain change
cd $libdir
libhost="http://minetest.kitsunemimi.pw"
download "https://github.com/minetest/irrlicht/releases/download/$irrlicht_version/win32.zip" irrlicht-$irrlicht_version-win32.zip
download "$libhost/zlib-$zlib_version-win32.zip"
download "$libhost/ucrt/zstd-$zstd_version-win32.zip"
download "$libhost/ucrt/libogg-$ogg_version-win32.zip"
download "$libhost/ucrt/libvorbis-$vorbis_version-win32.zip"
download "$libhost/curl-$curl_version-win32.zip"
download "https://github.com/minetest/irrlicht/releases/download/$irrlicht_version/win32-llvm.zip" irrlicht-$irrlicht_version-win32.zip
download "$libhost/llvm/zlib-$zlib_version-win32.zip"
download "$libhost/llvm/zstd-$zstd_version-win32.zip"
download "$libhost/llvm/libogg-$ogg_version-win32.zip"
download "$libhost/llvm/libvorbis-$vorbis_version-win32.zip"
download "$libhost/llvm/curl-$curl_version-win32.zip"
download "$libhost/ucrt/gettext-$gettext_version-win32.zip"
download "$libhost/freetype-$freetype_version-win32.zip"
download "$libhost/sqlite3-$sqlite3_version-win32.zip"
download "$libhost/luajit-$luajit_version-win32.zip"
download "$libhost/ucrt/libleveldb-$leveldb_version-win32.zip" leveldb-$leveldb_version-win32.zip
download "$libhost/openal-soft-$openal_version-win32.zip"
download "$libhost/llvm/freetype-$freetype_version-win32.zip"
download "$libhost/llvm/sqlite3-$sqlite3_version-win32.zip"
download "$libhost/llvm/luajit-$luajit_version-win32.zip"
download "$libhost/llvm/libleveldb-$leveldb_version-win32.zip"
download "$libhost/llvm/openal-soft-$openal_version-win32.zip"
# Set source dir, downloading Minetest as needed
get_sources