[llvm-dev] [RFC] [CMake] Removing support for LLVM_TOOL_<PROJECT> CMake cache variables
Dan Liew via llvm-dev
llvm-dev at lists.llvm.org
Wed Feb 6 04:09:50 PST 2019
> Dropping support for in-tree builds after the monorepo migration is an interesting question, because in theory people could still nest the read-only single project mirrors (assuming those end up coming to fruition) in the same style. I think it'd be good to reduce the number of supported configurations and clean up our build; I'm adding Chris to see what he thinks.
When we complete the migration to the monorepo my suggestion would be
to drop the special support we have today for in-tree builds. Instead
expose CMake cache variables that tell the CMake build where to find
the projects' source trees. By default they would be initialised to
their location in the monorepo but a user could pick any location. I
think this approach is better because it's more general (there is a
single source of truth for the location of a projects source tree),
and is general enough to allow the user to place projects, in tree if
they really want to.
This generality would also allow a user to build LLVM and other
projects with each project potentially at different revisions. Git
worktrees (i.e. create a worktree per project with a unique branch
name to avoid doing a git clone per project) could potentially make
this a bit easier too. It's a bit clunky but most people probably
shouldn't be mixing revisions anyway.
More information about the llvm-dev