[llvm-bugs] [Bug 48974] New: LLVM_DYLIB_COMPONENTS broken with multiple targets

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Jan 31 08:10:43 PST 2021


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

            Bug ID: 48974
           Summary: LLVM_DYLIB_COMPONENTS broken with multiple targets
           Product: Build scripts
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: cmake
          Assignee: unassignedbugs at nondot.org
          Reporter: nikita.ppv at gmail.com
                CC: llvm-bugs at lists.llvm.org

When using LLVM_DYLIB_COMPONENTS and building multiple targets, cmake will fail
with:

  Library 'x86' is a direct reference to a target library for an omitted
  target.
Call Stack (most recent call first):
  tools/llvm-shlib/CMakeLists.txt:18 (llvm_map_components_to_libnames)

This is despite the fact that X86 is included in LLVM_TARGETS_TO_BUILD.

The problem appears to be that
https://github.com/llvm/llvm-project/blob/7de711ecca99f81da3c2ae1705cefe0b4bda70b3/llvm/cmake/modules/LLVM-Config.cmake#L32
uses REMOVE_LIST to remove a list from a list, while it can only remove an
element from a list. As such, if LLVM_TARGETS_TO_BUILD contains multiple
targets, this will leave omitted_targets to contain all targets and incorrectly
fail the build.

-- 
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/20210131/808e9369/attachment-0001.html>


More information about the llvm-bugs mailing list