[PATCH] D105453: [mlir][SystemZ] Disable `-fno-semantic-interposition` option.
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 8 22:09:29 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG62cc3cdda64a: [CMake] Disable -fno-semantic-interposition for GCC<10.3 on SystemZ (authored by imaihal, committed by MaskRay).
Changed prior to commit:
https://reviews.llvm.org/D105453?vs=357411&id=357416#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105453/new/
https://reviews.llvm.org/D105453
Files:
llvm/cmake/modules/HandleLLVMOptions.cmake
Index: llvm/cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- llvm/cmake/modules/HandleLLVMOptions.cmake
+++ llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -313,13 +313,15 @@
add_flag_or_print_warning("-fPIC" FPIC)
# Enable interprocedural optimizations for non-inline functions which would
# otherwise be disabled due to GCC -fPIC's default.
+ # 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.
- if (CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND
- CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 13))
+ 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))
add_flag_if_supported("-fno-semantic-interposition" FNO_SEMANTIC_INTERPOSITION)
endif()
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105453.357416.patch
Type: text/x-patch
Size: 1225 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210709/9442fe98/attachment.bin>
More information about the llvm-commits
mailing list