Skip to content

Commit 814cd23

Browse files
knoepfelgreenc-FNAL
authored andcommitted
Disable -fno-semantic-interposition for Apple
1 parent 131b234 commit 814cd23

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Modules/private/PhlexOptimization.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,13 @@ include(CheckCXXCompilerFlag)
8181

8282
# Probe flag availability once at module-load time (results are cached in the
8383
# CMake cache and reused across reconfigures).
84-
check_cxx_compiler_flag("-fno-semantic-interposition" PHLEX_CXX_HAVE_NO_SEMANTIC_INTERPOSITION)
8584

8685
if(NOT APPLE)
8786
check_cxx_compiler_flag("-fno-plt" PHLEX_CXX_HAVE_NO_PLT)
87+
88+
# Apple/Clang accepts -fno-semantic-interposition but the Apple toolchain
89+
# driver treats it as unused for Mach-O builds.
90+
check_cxx_compiler_flag("-fno-semantic-interposition" PHLEX_CXX_HAVE_NO_SEMANTIC_INTERPOSITION)
8891
endif()
8992

9093
# ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)