[llvm] 2e18f63 - Fix some unit tests for LLVM_ENABLE_EXPORTED_SYMBOLS_IN_EXECUTABLES=Off.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 11 22:19:01 PDT 2024
Author: Lang Hames
Date: 2024-09-12T15:18:53+10:00
New Revision: 2e18f636fd39b59a85194c2a8f10732138a0f8ec
URL: https://github.com/llvm/llvm-project/commit/2e18f636fd39b59a85194c2a8f10732138a0f8ec
DIFF: https://github.com/llvm/llvm-project/commit/2e18f636fd39b59a85194c2a8f10732138a0f8ec.diff
LOG: Fix some unit tests for LLVM_ENABLE_EXPORTED_SYMBOLS_IN_EXECUTABLES=Off.
Building with -DLLVM_ENABLE_EXPORTED_SYMBOLS_IN_EXECUTABLES=Off should not
prevent the PluginsTests and DynamicLibraryTests unit tests from working.
This fix uses the approach implemented in
https://github.com/llvm/llvm-project/pull/101741.
rdar://135849875
Added:
Modified:
llvm/unittests/Passes/Plugins/CMakeLists.txt
llvm/unittests/Support/DynamicLibrary/CMakeLists.txt
Removed:
################################################################################
diff --git a/llvm/unittests/Passes/Plugins/CMakeLists.txt b/llvm/unittests/Passes/Plugins/CMakeLists.txt
index e90cae167bc222..9fd543db39c8e7 100644
--- a/llvm/unittests/Passes/Plugins/CMakeLists.txt
+++ b/llvm/unittests/Passes/Plugins/CMakeLists.txt
@@ -6,8 +6,9 @@ if (NOT WIN32 AND NOT CYGWIN)
set(LLVM_LINK_COMPONENTS Support Passes Core AsmParser)
add_llvm_unittest(PluginsTests
PluginsTest.cpp
+
+ EXPORT_SYMBOLS
)
- export_executable_symbols_for_plugins(PluginsTests)
target_link_libraries(PluginsTests PRIVATE LLVMTestingSupport)
unset(LLVM_LINK_COMPONENTS)
diff --git a/llvm/unittests/Support/DynamicLibrary/CMakeLists.txt b/llvm/unittests/Support/DynamicLibrary/CMakeLists.txt
index e976cba23ee8cf..d8dff1ef4a3f77 100644
--- a/llvm/unittests/Support/DynamicLibrary/CMakeLists.txt
+++ b/llvm/unittests/Support/DynamicLibrary/CMakeLists.txt
@@ -17,9 +17,10 @@ set_output_directory(DynamicLibraryLib
add_llvm_unittest(DynamicLibraryTests
DynamicLibraryTest.cpp
+
+ EXPORT_SYMBOLS
)
target_link_libraries(DynamicLibraryTests PRIVATE DynamicLibraryLib)
-export_executable_symbols(DynamicLibraryTests)
function(dynlib_add_module NAME)
add_library(${NAME} MODULE
More information about the llvm-commits
mailing list