Fix DynamicLibraryTests build on Windows when LLVM_EXPORT_SYMBOLS_FOR_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
This commit is contained in:
Michael Platings 2018-11-28 15:19:55 +00:00
parent 53e52e47e8
commit 86f7497974
1 changed files with 7 additions and 0 deletions

View File

@ -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
)