Fixed -fno-semantic-interposition warning with apple-clang

This commit is contained in:
kobalicek
2023-09-11 10:47:10 +02:00
parent 8c9b0073a7
commit 46bdb67262

View File

@@ -212,9 +212,12 @@ if (NOT ASMJIT_NO_CUSTOM_FLAGS)
list(APPEND ASMJIT_PRIVATE_CFLAGS -fno-math-errno)
list(APPEND ASMJIT_PRIVATE_CFLAGS_REL -O2)
asmjit_detect_cflags(ASMJIT_PRIVATE_CFLAGS
-fno-threadsafe-statics
-fno-semantic-interposition)
# -fno-semantic-interposition is not available on apple - the compiler issues a warning, which is not detected.
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
asmjit_detect_cflags(ASMJIT_PRIVATE_CFLAGS -fno-threadsafe-statics)
else()
asmjit_detect_cflags(ASMJIT_PRIVATE_CFLAGS -fno-threadsafe-statics -fno-semantic-interposition)
endif()
# The following flags can save few bytes in the resulting binary.
asmjit_detect_cflags(ASMJIT_PRIVATE_CFLAGS_REL