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: unassignedb...@nondot.org
          Reporter: nikita....@gmail.com
                CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to