diff options
author | 2025-04-19 04:17:08 +1000 | |
---|---|---|
committer | 2025-04-19 04:17:08 +1000 | |
commit | c2a22eb5e2635bcc5bc2b8837e91763d631860af (patch) | |
tree | 4a59e29fb1a8fe60051f531202aeef572726f568 | |
parent | 98736c097208d69aa24f4c5366b77b6362285371 (diff) |
3rdparty/bimg: Re-added hack to work around GitHub CI issues.
Attempt to enable SSE features explicitly specified in ARCHOPTS. It
will still fall back to SSE 2 if you just use -march= to enable later
SSE features.
-rwxr-xr-x | scripts/src/3rdparty.lua | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua index 85c761b4b5b..3ea340dbd9e 100755 --- a/scripts/src/3rdparty.lua +++ b/scripts/src/3rdparty.lua @@ -1395,6 +1395,25 @@ project "bimg" "BX_CONFIG_DEBUG=0", } + if not string.find(_OPTIONS["gcc"], "clang") then + -- This is a gross hack. For some reason GitHub Actions MinGW GCC seems to define SSE feature macros for features that are not enabled. + local archopts = (_OPTIONS["ARCHOPTS"] or "") .. " " .. (_OPTIONS["ARCHOPTS_CXX"] or "") + local ssever = "20" + if string.find(archopts, "-msse4.2") then + ssever = "42" + elseif string.find(archopts, "-msse4.1") then + ssever = "41" + elseif string.find(archopts, "-msse3") then + ssever = "30" + end + configuration { "x64", "mingw*", "not arm64" } + defines { + "ASTCENC_AVX=0", + "ASTCENC_SSE=" .. ssever, + } + configuration { } + end + configuration { "x32" } defines { "ASTCENC_AVX=0", |