[PATCH] D117183: [CMake] Don't use -fno-semantic-interposition with Clang<=13
    Fangrui Song via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Jan 13 15:38:13 PST 2022
    
    
  
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG1661c8cfcd6b: [CMake] Don't use -fno-semantic-interposition with Clang<=13 (authored by MaskRay).
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117183/new/
https://reviews.llvm.org/D117183
Files:
  llvm/cmake/modules/HandleLLVMOptions.cmake
Index: llvm/cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- llvm/cmake/modules/HandleLLVMOptions.cmake
+++ llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -315,12 +315,11 @@
     # 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()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117183.399817.patch
Type: text/x-patch
Size: 1135 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220113/ee6d4f71/attachment.bin>
    
    
More information about the llvm-commits
mailing list