Skip to content

Commit

Permalink
Merge pull request #3409 from FEX-Emu/revert-3394-PreserveAllOption
Browse files Browse the repository at this point in the history
Revert "Add cmake option DISABLE_CLANG_PRESERVE_ALL"
  • Loading branch information
neobrain authored Feb 5, 2024
2 parents 235f32c + a1343e9 commit 435b67a
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions FEXCore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ include(CheckCXXCompilerFlag)
include(CheckIncludeFileCXX)
include(CheckCXXSourceCompiles)

# Clang17 introduced __attribute__((preserve_all)).
# This is a performance improvement for x87 insts (ref: https://github.com/FEX-Emu/FEX/pull/3120)
# However since CI doesn't use clang17 yet, this is unsupported in instcountci.
# If you use clang17, you need to force disable of preserve_all to see instcountci passing.
# Use -DDISABLE_CLANG_PRESERVE_ALL=TRUE to force disable.
option(DISABLE_CLANG_PRESERVE_ALL "Force disable clang::preserve_all" OFF)
set(CMAKE_REQUIRED_FLAGS "-std=c++11 -Wattributes -Werror=attributes")
check_cxx_source_compiles(
"
Expand All @@ -43,21 +37,14 @@ check_cxx_source_compiles(
}"
HAS_CLANG_PRESERVE_ALL)
unset(CMAKE_REQUIRED_FLAGS)

if (HAS_CLANG_PRESERVE_ALL)
if (MINGW_BUILD)
message(STATUS "Ignoring broken clang::preserve_all support")
set(HAS_CLANG_PRESERVE_ALL FALSE)
else()
message(STATUS "Has clang::preserve_all")
endif()
else()
message(STATUS "UNSUPPORTED clang::preserve_all")
endif()
if (DISABLE_CLANG_PRESERVE_ALL AND HAS_CLANG_PRESERVE_ALL)
message(STATUS "Support for clang::preserve_all available, but disabled")
set(HAS_CLANG_PRESERVE_ALL FALSE)
endif()
endif ()

if (EXISTS ${CMAKE_CURRENT_DIR}/External/vixl/)
# Useful to have for freestanding libFEXCore
Expand Down

0 comments on commit 435b67a

Please sign in to comment.