[PATCH] D54701: Fix DynamicLibraryTests build on Windows when LLVM_EXPORT_SYMBOLS_FOR_PLUGINS is ON

Michael Platings via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 19 08:05:13 PST 2018


michaelplatings created this revision.
michaelplatings added reviewers: miyuki, marsupial.
Herald added subscribers: llvm-commits, mgorny.

extract_symbols.py (introduced in https://reviews.llvm.org/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: https://reviews.llvm.org/D54587


Repository:
  rL LLVM

https://reviews.llvm.org/D54701

Files:
  unittests/Support/DynamicLibrary/CMakeLists.txt


Index: unittests/Support/DynamicLibrary/CMakeLists.txt
===================================================================
--- unittests/Support/DynamicLibrary/CMakeLists.txt
+++ unittests/Support/DynamicLibrary/CMakeLists.txt
@@ -8,6 +8,12 @@
   )
 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
   )


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54701.174617.patch
Type: text/x-patch
Size: 655 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181119/890324ce/attachment.bin>


More information about the llvm-commits mailing list