<div dir="ltr">This broke MSVC:<div><a href="http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/14538">http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/14538</a> </div><div>I pushed a speculative fix, but who knows if it'll do the trick.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 27, 2020 at 10:01 PM Saleem Abdulrasool via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Author: Saleem Abdulrasool<br>
Date: 2020-02-27T22:00:30-08:00<br>
New Revision: c3595d1069277b4ab0df49d7139b6f1bbc94f21c<br>
<br>
URL: <a href="https://github.com/llvm/llvm-project/commit/c3595d1069277b4ab0df49d7139b6f1bbc94f21c" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/c3595d1069277b4ab0df49d7139b6f1bbc94f21c</a><br>
DIFF: <a href="https://github.com/llvm/llvm-project/commit/c3595d1069277b4ab0df49d7139b6f1bbc94f21c.diff" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/c3595d1069277b4ab0df49d7139b6f1bbc94f21c.diff</a><br>
<br>
LOG: build: process the libxml2 library path for embedding<br>
<br>
Process the path for libxml2 before embedding that into the command line<br>
that is generated in `llvm-config`.  Each element in the path is being<br>
given a `-l` unconditionally which should not be the case for absolute<br>
paths.  Since the library path may be absolute or not, just apply some<br>
CMake pre-processing when generating the path.<br>
<br>
Before:<br>
```<br>
/usr/lib/x86_64-linux-gnu/libz.so -lrt -ldl -ltinfo -lpthread -lm /usr/lib/x86_64-linux-gnu/libxml2.so<br>
```<br>
<br>
After:<br>
```<br>
/usr/lib/x86_64-linux-gnu/libz.so -lrt -ldl -ltinfo -lpthread -lm -lxml2<br>
```<br>
<br>
Resolves PR44179!<br>
<br>
Added: <br>
<br>
<br>
Modified: <br>
    llvm/lib/WindowsManifest/CMakeLists.txt<br>
<br>
Removed: <br>
<br>
<br>
<br>
################################################################################<br>
diff  --git a/llvm/lib/WindowsManifest/CMakeLists.txt b/llvm/lib/WindowsManifest/CMakeLists.txt<br>
index fe6ddcd414d5..8cfea1282ad6 100644<br>
--- a/llvm/lib/WindowsManifest/CMakeLists.txt<br>
+++ b/llvm/lib/WindowsManifest/CMakeLists.txt<br>
@@ -7,6 +7,15 @@ add_llvm_component_library(LLVMWindowsManifest<br>
<br>
 if(LIBXML2_LIBRARIES)<br>
   target_link_libraries(LLVMWindowsManifest PUBLIC ${LIBXML2_LIBRARIES})<br>
+<br>
+  get_filename_component(xml2_library ${LIBXML2_LIBRARIES} NAME)<br>
+  if(xml2_library MATCHES "^${CMAKE_STATIC_LIBRARY_PREFIX}.*${CMAKE_STATIC_LIBRARY_SUFFIX}$")<br>
+    string(REGEX REPLACE "^${CMAKE_STATIC_LIBRARY_PREFIX}" "" xml2_library ${xml2_library})<br>
+    string(REGEX REPLACE "${CMAKE_STATIC_LIBRARY_SUFFIX}$" "" xml2_library ${xml2_library})<br>
+  elseif(xml2_library MATCHES "^${CMAKE_SHARED_LIBRARY_PREFIX}.*${CMAKE_SHARED_LIBRARY_SUFFIX}$")<br>
+    string(REGEX REPLACE "^${CMAKE_SHARED_LIBRARY_PREFIX}" "" xml2_library ${xml2_library})<br>
+    string(REGEX REPLACE "${CMAKE_SHARED_LIBRARY_SUFFIX}$" "" xml2_library ${xml2_library})<br>
+  endif()<br>
   set_property(TARGET LLVMWindowsManifest PROPERTY<br>
-    LLVM_SYSTEM_LIBS ${LIBXML2_LIBRARIES})<br>
+    LLVM_SYSTEM_LIBS ${xml2_library})<br>
 endif()<br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>