[PATCH] D108173: [WIP][clang] Add a cmake flag for choosing to build clang-repl

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 17 00:26:50 PDT 2021


phosek added a comment.

Rather than hardcoding this only for `clang-repl`, I'd prefer to use a more generic approach.

We already have `LLVM_DISTRIBUTION_COMPONENTS` so one possibility would be to set a lit feature for every component. For example, if `LLVM_DISTRIBUTION_COMPONENTS=foo;bar` we would set `foo-distribution-component` and `bar-distribution-component`. The challenge is handling the default case where you want to build and test everything. We might be able to use CMake properties for that purpose to get the list of all tools and define the corresponding features.

Alternative would be to iterate over the `CLANG_TEST_DEPS` list and check if each entry is in `LLVM_DISTRIBUTION_COMPONENTS`, and if so add it to the list of dependencies and set a feature for it. If `LLVM_DISTRIBUTION_COMPONENTS` is empty, then include everything.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108173/new/

https://reviews.llvm.org/D108173



More information about the cfe-commits mailing list