Build: Disable -fno-semantic-interposition on macOS

This commit is contained in:
Connor McLaughlin 2021-06-04 19:03:49 +10:00
parent cac8080657
commit ebcc11750d
1 changed files with 3 additions and 1 deletions

View File

@ -227,7 +227,9 @@ endif()
if(ANDROID OR BUILD_LIBRETRO_CORE)
set(CMAKE_C_VISIBILITY_PRESET hidden)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# -fno-semantic-interposition appears to be broken on Macs... of course.
if((CMAKE_COMPILER_IS_GNUCC OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") AND NOT APPLE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-semantic-interposition")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-semantic-interposition")
endif()