[llvm] 340e7c0 - build: avoid hardcoding the libxml2 library name

Eric Christopher via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 2 14:36:14 PST 2019


Hi Saleem,

I've temporarily reverted this here:

echristo at jhereg ~/s/llvm-project> git push
To github.com:llvm/llvm-project.git
   936de1c5bc2..2e75681b55a  master -> master

after the breakage in llvm-config --system-libs that was reported on the
bug. Sorry for the inconvenience and if there's anything you need.

-eric

On Wed, Nov 27, 2019 at 12:36 PM Saleem Abdulrasool via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

>
> Author: Saleem Abdulrasool
> Date: 2019-11-27T12:36:25-08:00
> New Revision: 340e7c0b77a7037afefe7255503afe362967b577
>
> URL:
> https://github.com/llvm/llvm-project/commit/340e7c0b77a7037afefe7255503afe362967b577
> DIFF:
> https://github.com/llvm/llvm-project/commit/340e7c0b77a7037afefe7255503afe362967b577.diff
>
> LOG: build: avoid hardcoding the libxml2 library name
>
> FindLibXml2 will set the LIBXML2_LIBRARIES variable to the libraries that
> we must link against. This will be an empty string if libxml2 is not
> found. Avoid hardcoding the library name as xml2 in the configuration.
> Simplify the usage in the WindowsManifest library.
>
> 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..8868564da76f 100644
> --- a/llvm/lib/WindowsManifest/CMakeLists.txt
> +++ b/llvm/lib/WindowsManifest/CMakeLists.txt
> @@ -1,10 +1,3 @@
> -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
>
> @@ -12,7 +5,8 @@ add_llvm_component_library(LLVMWindowsManifest
>    ${LLVM_MAIN_INCLUDE_DIR}/llvm/WindowsManifest
>    ${Backtrace_INCLUDE_DIRS}
>
> -  LINK_LIBS ${system_libs}
> +  LINK_LIBS ${LIBXML2_LIBRARIES}
>    )
>
> -set_property(TARGET LLVMWindowsManifest PROPERTY LLVM_SYSTEM_LIBS
> "${system_libs}")
> +set_property(TARGET LLVMWindowsManifest PROPERTY
> +  LLVM_SYSTEM_LIBS ${LIBXML2_LIBRARIES})
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191202/5f1cc085/attachment.html>


More information about the llvm-commits mailing list