[PATCH] D57535: [CMake] Use LLVM_ENABLE_PROJECTS as the "single source" of truth when used.

Dan Liew via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 2 05:14:33 PST 2019


delcypher added a comment.

In D57535#1381862 <https://reviews.llvm.org/D57535#1381862>, @smeenai wrote:

> Would it be equivalent if you changed https://reviews.llvm.org/diffusion/L/browse/llvm/trunk/cmake/modules/AddLLVM.cmake;352949$1007-1009?as=source&blame=off from an `option` to a `FORCE`d cache set? The default value is computed based off the presence of the corresponding `LLVM_EXTERNAL_*_SOURCE_DIR` variable, which will be set for each project in `LLVM_ENABLE_PROJECTS`.


No it would not be equivalent.

In the case where the user is not using `LLVM_ENABLE_PROJECTS, any user provided value for `LLVM_TOOL_<PROJECT>_BUILD` (e.g. `LLVM_TOOL_CLANG_BUILD`) would be ignored because it would always get overwritten with `${${canonical_full_name}_BUILD_DEFAULT}`. This would break existing user workflows.

The whole point of this patch is to improve the `LLVM_ENABLE_PROJECTS` workflow without breaking workflows that set the `LLVM_TOOL_<PROJECT>_BUILD` variables. I'd like to stop `LLVM_TOOL_<PROJECT>_BUILD`  variables from being CMake cache variables at some point so that those variables are no longer user facing. However that is going to require an RFC and is out of scope for this patch.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D57535





More information about the llvm-commits mailing list