summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--llvm/cmake/modules/HandleLLVMOptions.cmake7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake
index 0c3419390c27..cfcbb8f8aec3 100644
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -316,12 +316,11 @@ if( LLVM_ENABLE_PIC )
# Note: GCC<10.3 has a bug on SystemZ.
#
# Note: Clang allows IPO for -fPIC so this optimization is less effective.
- # Older Clang may support -fno-semantic-interposition but it used local
- # aliases to optimize global variables, which is incompatible with copy
- # relocations due to -fno-pic.
+ # Clang 13 has a bug related to -fsanitize-coverage
+ # -fno-semantic-interposition (https://reviews.llvm.org/D117183).
if ((CMAKE_COMPILER_IS_GNUCXX AND
NOT (LLVM_NATIVE_ARCH STREQUAL "SystemZ" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10.3))
- OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 13))
+ OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 14))
add_flag_if_supported("-fno-semantic-interposition" FNO_SEMANTIC_INTERPOSITION)
endif()
endif()