[libcxx-dev] [llvm-dev] RFC: A top level monorepo CMake file
Renato Golin via libcxx-dev
libcxx-dev at lists.llvm.org
Thu Jun 18 12:23:33 PDT 2020
On Thu, 18 Jun 2020 at 19:55, Louis Dionne <ldionne at apple.com> wrote:
> I disagree. The root cause of the problem is that including <monorepo-root>/llvm/CMakeLists.txt is equivalent to asking to compile LLVM for the target we're targeting. However, this may simply not make sense for some target platforms, where one would never build a compiler for that target. I guess we could add conditionals to guard parts of llvm/CMakeLists.txt (and children of it) so that it appears to work on all targets we care about, but that would just be adding complexity to llvm/CMakeLists.txt, when what we *really* want to do is just bypass its CMake configuration altogether.
Some of them, not the big one. :)
For example, the split between projects and runtime for the libraries
and their complicated dependencies between each other.
> I think we both need to fix our CMake usage (like global variables, global flags setting and other anti patterns), and also allow bypassing projects that we don't want to build. I suspect the only reason why things were set up inside llvm/CMakeLists.txt is that historically, there was simply no monorepo root we could add a CMake file to. If there had been one, I strongly suspect things would have been the way I describe since the start.
Monorepo is new, sure, but before that, we still had to link
directories in specific places inside /llvm to compile stuff. It was
more because "llvm was the root CMake" than multi/mono repo. LLVM was
the first, and others started to appear and re-use the infrastructure
instead of replicating, that's why the mess.
More information about the libcxx-dev
mailing list