[llvm-bugs] [Bug 44179] New: llvm-config --system-libs prints entire libxml2 path

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Nov 29 00:36:30 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=44179

            Bug ID: 44179
           Summary: llvm-config --system-libs prints entire libxml2 path
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Keywords: regression
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: vlee at freedesktop.org
                CC: compnerd at compnerd.org, htmldeveloper at gmail.com,
                    llvm-bugs at lists.llvm.org

llvm-config --system-libs now prints the entire libxml2 path.

Before
$ llvm-config --system-libs
-lz -lrt -ldl -ltinfo -lpthread -lm -lxml2

Now
$ llvm-config --system-libs
-lz -lrt -ldl -ltinfo -lpthread -lm -l/usr/lib/x86_64-linux-gnu/libxml2.so

This leads to linking errors if depending on llvm-config --system-libs during
compilation.
/usr/bin/ld: cannot find -l/usr/lib/x86_64-linux-gnu/libxml2


This new behavior is introduced with these llvm-10 commits.

commit cfcfd8a056eb7c01bc76b745ce9f7839f0dcbc42
Author: Saleem Abdulrasool <compnerd at compnerd.org>
Date:   Wed Nov 27 12:55:46 2019 -0800

    build: avoid cached literals being linked against

    If the value of the LibXml2 search is cached, it can cause an errant
    link against LIBXML2_LIBRARIES-NOTFOUND if libxml2 is not found. Add
    a guard against this.  Should repair the build bots.

commit 340e7c0b77a7037afefe7255503afe362967b577
Author: Saleem Abdulrasool <compnerd at compnerd.org>
Date:   Wed Nov 27 12:34:36 2019 -0800

    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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191129/932d65fb/attachment.html>


More information about the llvm-bugs mailing list