[PATCH] D105453: [mlir][System_Z] Disable `-fno-semantic-interposition` option.

Haruki Imai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 5 19:19:15 PDT 2021


imaihal created this revision.
Herald added subscribers: rriddle, mgorny.
imaihal requested review of this revision.
Herald added subscribers: llvm-commits, stephenneuendorffer.
Herald added a project: LLVM.

`-fno-semantic-interposition` was added in D102453 <https://reviews.llvm.org/D102453>. MLIR test on SystemZ
failed after the patch. This patch disables it only in MLIR build for
SystemZ.

Signed-off-by: Haruki Imai <imaihal at jp.ibm.com>


Repository:
  rG LLVM Github Monorepo

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
@@ -318,8 +318,11 @@
     # 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))
+    # [MLIR, SystemZ] Disabled `-fno-semantic-interposition` on MLIR on SystemZ
+    # because MLIR test failed when using gcc.
+    if ((CMAKE_COMPILER_IS_GNUCXX AND
+	  NOT ("mlir" IN_LIST LLVM_ENABLE_PROJECTS AND LLVM_NATIVE_ARCH STREQUAL "SystemZ"))
+	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.356588.patch
Type: text/x-patch
Size: 1018 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210706/babac5e2/attachment.bin>


More information about the llvm-commits mailing list