[llvm] [CMake] Use old DynamicLibrary symbol behavior on AIX for now (PR #108692)

Jake Egan via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 14 02:56:58 PDT 2024


https://github.com/jakeegan created https://github.com/llvm/llvm-project/pull/108692

New behavior broke the AIX bot, so fall back to the old behavior on AIX for now to give time to investigate

>From 027d5bbf7e00494e831690342e1693fafe66928d Mon Sep 17 00:00:00 2001
From: Jake Egan <jake.egan at ibm.com>
Date: Sat, 14 Sep 2024 05:41:17 -0400
Subject: [PATCH] [CMake] Use old DynamicLibrary symbol behavior on AIX for now

---
 .../Support/DynamicLibrary/CMakeLists.txt      | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/llvm/unittests/Support/DynamicLibrary/CMakeLists.txt b/llvm/unittests/Support/DynamicLibrary/CMakeLists.txt
index d8dff1ef4a3f77..2366209c25aee0 100644
--- a/llvm/unittests/Support/DynamicLibrary/CMakeLists.txt
+++ b/llvm/unittests/Support/DynamicLibrary/CMakeLists.txt
@@ -15,12 +15,22 @@ set_output_directory(DynamicLibraryLib
   LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}
   )
 
-add_llvm_unittest(DynamicLibraryTests
-  DynamicLibraryTest.cpp
+# FIXME: Find out why AIX fails with new DynamicLibrary symbols behavior.
+if(${CMAKE_SYSTEM_NAME} MATCHES "AIX")
+  add_llvm_unittest(DynamicLibraryTests
+    DynamicLibraryTest.cpp
+    )
+else()
+  add_llvm_unittest(DynamicLibraryTests
+    DynamicLibraryTest.cpp
 
-  EXPORT_SYMBOLS
-  )
+    EXPORT_SYMBOLS
+    )
+endif()
 target_link_libraries(DynamicLibraryTests PRIVATE DynamicLibraryLib)
+if(${CMAKE_SYSTEM_NAME} MATCHES "AIX")
+  export_executable_symbols(DynamicLibraryTests)
+endif()
 
 function(dynlib_add_module NAME)
   add_library(${NAME} MODULE



More information about the llvm-commits mailing list