Skip to content

Commit

Permalink
Fix DynamicLibraryTests build on Windows when LLVM_EXPORT_SYMBOLS_FOR…
Browse files Browse the repository at this point in the history
…_PLUGINS is ON

extract_symbols.py (introduced in D18826) expects all of its library arguments
to be in the same directory - typically <config>/lib. DynamicLibraryLib.lib is
instead to be found in lib/<config>.
This patch intended to make DynamicLibraryLib.lib be created in <config>/lib
alongside most of the other libraries.

I previously tried passing absolute paths to extract_symbols.py but this
generated command lines that were too long for Visual Studio 2015: D54587

Differential Revision: https://reviews.llvm.org/D54701

llvm-svn: 347764
  • Loading branch information
mplatings committed Nov 28, 2018
1 parent 53e52e4 commit 86f7497
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions llvm/unittests/Support/DynamicLibrary/CMakeLists.txt
Expand Up @@ -8,6 +8,13 @@ add_library(DynamicLibraryLib STATIC
)
set_target_properties(DynamicLibraryLib PROPERTIES FOLDER "Tests")

# extract_symbols.py relies on all its library arguments being in the same
# directory, so we must set the output directory in the same way as if
# add_llvm_library was used.
set_output_directory(DynamicLibraryLib
LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}
)

add_llvm_unittest(DynamicLibraryTests
DynamicLibraryTest.cpp
)
Expand Down

0 comments on commit 86f7497

Please sign in to comment.