Skip to content

Commit f4306cc

Browse files
committed
[PowerPC][AIX] Remove flag for no semantic interposition
Remove flag to sepcifcy "no semantic interposition" since this is the default for AIX.
1 parent 17cbb48 commit f4306cc

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

llvm/cmake/modules/HandleLLVMOptions.cmake

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -450,13 +450,16 @@ if( LLVM_ENABLE_PIC )
450450
# Enable interprocedural optimizations for non-inline functions which would
451451
# otherwise be disabled due to GCC -fPIC's default.
452452
# Note: GCC<10.3 has a bug on SystemZ.
453-
#
453+
# Note: Default on AIX is "no semantic interposition".
454454
# Note: Clang allows IPO for -fPIC so this optimization is less effective.
455455
# Clang 13 has a bug related to -fsanitize-coverage
456456
# -fno-semantic-interposition (https://reviews.llvm.org/D117183).
457-
if ((CMAKE_COMPILER_IS_GNUCXX AND
458-
NOT (LLVM_NATIVE_ARCH STREQUAL "SystemZ" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10.3))
459-
OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 14))
457+
if ((NOT ("${CMAKE_SYSTEM_NAME}" MATCHES "AIX"))
458+
AND ((CMAKE_COMPILER_IS_GNUCXX AND
459+
NOT (LLVM_NATIVE_ARCH STREQUAL "SystemZ"
460+
AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10.3))
461+
OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"
462+
AND CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 14)))
460463
add_flag_if_supported("-fno-semantic-interposition" FNO_SEMANTIC_INTERPOSITION)
461464
endif()
462465
endif()

0 commit comments

Comments
 (0)