[all-commits] [llvm/llvm-project] 5905e6: [runtimes] Handle interface targets in runtimes di...

Louis Dionne via All-commits all-commits at lists.llvm.org
Tue Aug 23 05:56:36 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5905e699342fd476d7eb9e35db5d84248a7e9156
      https://github.com/llvm/llvm-project/commit/5905e699342fd476d7eb9e35db5d84248a7e9156
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2022-08-23 (Tue, 23 Aug 2022)

  Changed paths:
    M llvm/cmake/modules/LLVMDistributionSupport.cmake
    M llvm/runtimes/CMakeLists.txt

  Log Message:
  -----------
  [runtimes] Handle interface targets in runtimes distribution components

As reported in [1], cxx-headers is not a valid distribution target
because it is an interface target in CMake. This breaks the most
basic MultiDistributionExample of the runtimes build.

This patch handles interface targets by getting rid of the assumption
that all distribution components have a target associated to them. It
is valid for a distribution component to only have a `install-FOO`
target.

In the case where only `cxx-headers` is provided as a distribution
component, `ninja toolchain-distribution` will not build anything
after this patch, since there is effectively nothing to build for
the `cxx-headers` target. However, running `ninja install-toolchain-distribution`
will build everything, as expected.

[1]: https://discord.com/channels/636084430946959380/636732894974312448/1010013287464828968

Differential Revision: https://reviews.llvm.org/D132387




More information about the All-commits mailing list