[llvm] r347764 - Fix DynamicLibraryTests build on Windows when LLVM_EXPORT_SYMBOLS_FOR_PLUGINS is ON

Michael Platings via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 28 07:19:55 PST 2018


Author: michaelplatings
Date: Wed Nov 28 07:19:55 2018
New Revision: 347764

URL: http://llvm.org/viewvc/llvm-project?rev=347764&view=rev
Log:
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

Modified:
    llvm/trunk/unittests/Support/DynamicLibrary/CMakeLists.txt

Modified: llvm/trunk/unittests/Support/DynamicLibrary/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/DynamicLibrary/CMakeLists.txt?rev=347764&r1=347763&r2=347764&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/DynamicLibrary/CMakeLists.txt (original)
+++ llvm/trunk/unittests/Support/DynamicLibrary/CMakeLists.txt Wed Nov 28 07:19:55 2018
@@ -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
   )




More information about the llvm-commits mailing list