Fix Windows ARM64 build: disable x86 asm in StormLib's libtomcrypt

StormLib's bundled libtomcrypt uses x86 inline assembly (bswapl/movl)
gated by __MINGW32__, which is defined on CLANGARM64 too. Pass
-DLTC_NO_BSWAP to force portable C byte-swap fallback.
This commit is contained in:
Kelsi 2026-02-25 03:06:06 -08:00
parent 9b90ab0429
commit 7ca9caa212
6 changed files with 26 additions and 89 deletions

View file

@ -195,10 +195,14 @@ jobs:
shell: msys2 {0}
run: |
git clone --depth 1 https://github.com/ladislav-zezula/StormLib.git /tmp/StormLib
# Disable x86 inline asm in bundled libtomcrypt (bswapl/movl) —
# __MINGW32__ is defined on CLANGARM64 which incorrectly enables x86 asm
cmake -S /tmp/StormLib -B /tmp/StormLib/build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="$MINGW_PREFIX" \
-DBUILD_SHARED_LIBS=OFF
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_C_FLAGS="-DLTC_NO_BSWAP" \
-DCMAKE_CXX_FLAGS="-DLTC_NO_BSWAP"
cmake --build /tmp/StormLib/build --parallel $(nproc)
cmake --install /tmp/StormLib/build