mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-11-07 09:16:08 -10:00
CMake: Add an llvm-mingw clang version check to preserve_all
llvm has supported preserve_all abi on Windows ABI since https://github.com/llvm/llvm-project/pull/166436. This has been in a clang release since 22.1. Do a clang version check to ensure the compiler is >= 22.1 to enabled preserve_all under wow64/arm64ec. This will give a performance boost to applications that require x87 full precision and a couple other minor things.
This commit is contained in:
1 file changed
+3
-1
+3
-1
@@ -254,7 +254,9 @@ check_cxx_source_compiles(
|
||||
HAS_CLANG_PRESERVE_ALL)
|
||||
unset(CMAKE_REQUIRED_FLAGS)
|
||||
if (HAS_CLANG_PRESERVE_ALL)
|
||||
if (MINGW)
|
||||
message(STATUS "Clang version ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
set(CLANG_MINIMUM_VERSION 22.1)
|
||||
if (MINGW AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${CLANG_MINIMUM_VERSION})
|
||||
message(STATUS "Ignoring broken clang::preserve_all support")
|
||||
set(HAS_CLANG_PRESERVE_ALL FALSE)
|
||||
else()
|
||||
|
||||
Reference in new issue
Block a user