From e10b16c5df61ccca6a9dc66252a218696924f178 Mon Sep 17 00:00:00 2001 From: Roger Ferrer Ibanez Date: Fri, 26 May 2017 12:51:12 +0000 Subject: [PATCH] Export the required symbol from DynamicLibraryTests 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. This change fixes https://bugs.llvm.org/show_bug.cgi?id=32893 Patch authored by Momchil Velikov. Differential Revision: https://reviews.llvm.org/D33490 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303979 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/Support/DynamicLibrary/CMakeLists.txt | 1 + unittests/Support/DynamicLibrary/DynamicLibraryTests.exports | 1 + 2 files changed, 2 insertions(+) create mode 100644 unittests/Support/DynamicLibrary/DynamicLibraryTests.exports diff --git a/unittests/Support/DynamicLibrary/CMakeLists.txt b/unittests/Support/DynamicLibrary/CMakeLists.txt index f0e945e78b1..8c4a1d388e3 100644 --- a/unittests/Support/DynamicLibrary/CMakeLists.txt +++ b/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) diff --git a/unittests/Support/DynamicLibrary/DynamicLibraryTests.exports b/unittests/Support/DynamicLibrary/DynamicLibraryTests.exports new file mode 100644 index 00000000000..a9122211071 --- /dev/null +++ b/unittests/Support/DynamicLibrary/DynamicLibraryTests.exports @@ -0,0 +1 @@ +TestA -- 2.40.0