[llvm] abe8de2 - Revert "Temporarily revert "build: avoid hardcoding the libxml2 library name""
Saleem Abdulrasool via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 3 09:28:55 PST 2019
Author: Saleem Abdulrasool
Date: 2019-12-03T09:27:14-08:00
New Revision: abe8de29c4ae5eca86f3594d2edd43b2fcbda623
URL: https://github.com/llvm/llvm-project/commit/abe8de29c4ae5eca86f3594d2edd43b2fcbda623
DIFF: https://github.com/llvm/llvm-project/commit/abe8de29c4ae5eca86f3594d2edd43b2fcbda623.diff
LOG: Revert "Temporarily revert "build: avoid hardcoding the libxml2 library name""
This reverts commit 2e75681b55ab55301022533b203269f5f3d6f909. Restore
the clean up change. The underlying CMake issue was resolved in
372ad32734ecb455f9fb4d0601229ca2dfc78b66.
Added:
Modified:
llvm/cmake/config-ix.cmake
llvm/lib/WindowsManifest/CMakeLists.txt
Removed:
################################################################################
diff --git a/llvm/cmake/config-ix.cmake b/llvm/cmake/config-ix.cmake
index 028a2cc86bf3..e7e5e5dcf2ff 100644
--- a/llvm/cmake/config-ix.cmake
+++ b/llvm/cmake/config-ix.cmake
@@ -166,7 +166,6 @@ if(NOT LLVM_USE_SANITIZER MATCHES "Memory.*")
else()
include_directories(${LIBXML2_INCLUDE_DIR})
endif()
- set(LIBXML2_LIBS "xml2")
endif()
endif()
endif()
diff --git a/llvm/lib/WindowsManifest/CMakeLists.txt b/llvm/lib/WindowsManifest/CMakeLists.txt
index 4f2d011d5434..fe6ddcd414d5 100644
--- a/llvm/lib/WindowsManifest/CMakeLists.txt
+++ b/llvm/lib/WindowsManifest/CMakeLists.txt
@@ -1,18 +1,12 @@
-set(system_libs)
-if( CMAKE_HOST_UNIX )
- if( LLVM_LIBXML2_ENABLED )
- set(system_libs ${system_libs} ${LIBXML2_LIBS})
- endif()
-endif()
-
add_llvm_component_library(LLVMWindowsManifest
WindowsManifestMerger.cpp
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/WindowsManifest
- ${Backtrace_INCLUDE_DIRS}
+ ${Backtrace_INCLUDE_DIRS})
- LINK_LIBS ${system_libs}
- )
-
-set_property(TARGET LLVMWindowsManifest PROPERTY LLVM_SYSTEM_LIBS "${system_libs}")
+if(LIBXML2_LIBRARIES)
+ target_link_libraries(LLVMWindowsManifest PUBLIC ${LIBXML2_LIBRARIES})
+ set_property(TARGET LLVMWindowsManifest PROPERTY
+ LLVM_SYSTEM_LIBS ${LIBXML2_LIBRARIES})
+endif()
More information about the llvm-commits
mailing list