[PATCH] D33490: Export the required symbol from DynamicLibraryTests

Momchil Velikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 24 05:12:46 PDT 2017


chill created this revision.
Herald added a subscriber: mgorny.

Running `unittests/Support/DynamicLibrary/DynamicLibraryTests` fails when LLVM is configured with   `LLVM_EXPORT_SYMBOLS_FOR_PLUGINS=ON`, because the test's version script only contains symbols
extracted from the static libraries, that the test links with, but not those from the main object/executable itself. The patch
explicitly exports the one symbol needed by the test.


https://reviews.llvm.org/D33490

Files:
  unittests/Support/DynamicLibrary/CMakeLists.txt
  unittests/Support/DynamicLibrary/DynamicLibraryTests.exports


Index: unittests/Support/DynamicLibrary/DynamicLibraryTests.exports
===================================================================
--- /dev/null
+++ unittests/Support/DynamicLibrary/DynamicLibraryTests.exports
@@ -0,0 +1 @@
+TestA
Index: unittests/Support/DynamicLibrary/CMakeLists.txt
===================================================================
--- unittests/Support/DynamicLibrary/CMakeLists.txt
+++ unittests/Support/DynamicLibrary/CMakeLists.txt
@@ -1,5 +1,6 @@
 set(LLVM_LINK_COMPONENTS Support)
 
+set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/DynamicLibraryTests.exports)
 add_llvm_unittest(DynamicLibraryTests DynamicLibraryTest.cpp)
 
 export_executable_symbols(DynamicLibraryTests)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33490.100061.patch
Type: text/x-patch
Size: 717 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170524/63482466/attachment.bin>


More information about the llvm-commits mailing list