https://llvm.org/bugs/show_bug.cgi?id=27685
Bug ID: 27685 Summary: LLD doesn't like it if LLVM_LINK_LLVM_DYLIB is turned on Product: lld Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: All Bugs Assignee: unassignedb...@nondot.org Reporter: e...@80386.nl CC: llvm-bugs@lists.llvm.org Classification: Unclassified Sylvestre Ledru and I are currently working on extending the Debian packages for LLVM (http://llvm.org/apt/) to also contain LLD. Sylvestre observed that his copy of LLD crashes on startup with the following message: $ lld-3.9 : CommandLine Error: Option 'asm-instrumentation' registered more than once! LLVM ERROR: inconsistency in registered CommandLine options *** Error in `lld-3.9': free(): invalid pointer: 0x00007fbcc967ab78 *** ======= Backtrace: ========= ... Looking into this in more detail, it seems like his copy of LLD is both statically and dynamically linked against LLVM libraries, which happens because he's building LLD with LLVM_LINK_LLVM_DYLIB set. Taking a quick glance at the LLD CMakeLists, I can imagine why this is happening. The add_lld_library() calls explicitly list the LLVM libraries we are interested in using. This is different from how this is done in the LLVM source tree, where we set LLVM_LINK_COMPONENTS to a list of libraries we want to use. These libraries are ignored if LLVM_LINK_LLVM_DYLIB is set (see cmake/modules/AddLLVM.cmake). I have to confess I know too little of CMake to fix this myself. Otherwise I would have sent out a code review for this. Just filing this bug to make sure it won't get lost. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs