[llvm] 35a0fd5 - Fix some another unit test for LLVM_ENABLE_EXPORTED_SYMBOLS_IN_EXECUTABLES=Off.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 11 22:27:16 PDT 2024


Author: Lang Hames
Date: 2024-09-12T15:27:08+10:00
New Revision: 35a0fd507f8975a97edeeeccbddcc7e8608fe5ca

URL: https://github.com/llvm/llvm-project/commit/35a0fd507f8975a97edeeeccbddcc7e8608fe5ca
DIFF: https://github.com/llvm/llvm-project/commit/35a0fd507f8975a97edeeeccbddcc7e8608fe5ca.diff

LOG: Fix some another unit test for LLVM_ENABLE_EXPORTED_SYMBOLS_IN_EXECUTABLES=Off.

Building with -DLLVM_ENABLE_EXPORTED_SYMBOLS_IN_EXECUTABLES=Off should not
prevent the AnalysisTests unit test from working.

This fix uses the approach implemented in
https://github.com/llvm/llvm-project/pull/101741.

rdar://135849875

Added: 
    

Modified: 
    llvm/unittests/Analysis/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/Analysis/CMakeLists.txt b/llvm/unittests/Analysis/CMakeLists.txt
index 84a4fe80991cf3..a3f4c10fcb9ad2 100644
--- a/llvm/unittests/Analysis/CMakeLists.txt
+++ b/llvm/unittests/Analysis/CMakeLists.txt
@@ -67,6 +67,8 @@ endif()
 
 add_llvm_unittest_with_input_files(AnalysisTests
   ${ANALYSIS_TEST_SOURCES}
+
+  EXPORT_SYMBOLS
   )
 
 add_dependencies(AnalysisTests intrinsics_gen)
@@ -79,10 +81,5 @@ if(CMAKE_SYSTEM_NAME STREQUAL "AIX")
   set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-brtl")
 endif()
 
-# Export symbols from the plugins shared objects.
-if(NOT WIN32)
-  export_executable_symbols_for_plugins(AnalysisTests)
-endif()
-
 add_subdirectory(InlineAdvisorPlugin)
 add_subdirectory(InlineOrderPlugin)


        


More information about the llvm-commits mailing list