[libcxx-commits] [PATCH] D62060: Make libc++'s libc++abi discovery work in the monorepo layout

Nico Weber via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri May 17 12:47:55 PDT 2019


thakis marked 2 inline comments as done.
thakis added inline comments.


================
Comment at: libcxx/CMakeLists.txt:150
+  # is always there and LLVM_ENABLE_PROJECTS controls if it's built.
+  # In the old layout, libcxxabi is built if it merely exists.
+  if (NOT LIBCXX_STANDALONE_BUILD AND
----------------
smeenai wrote:
> thakis wrote:
> > smeenai wrote:
> > > This isn't quite true either. You could define `LLVM_TOOL_LIBCXXABI_BUILD` to `OFF` to prevent the build. It just defaulted to building instead of defaulting to not building.
> > Isn't `LLVM_TOOL_FOO_BUILD` for stuff that went into llvm/tools in the old layout, while libcxx(abi) is in llvm/projects? I don't see references to LLVM_TOOL_ in llvm/projects/CMakeLists.txt.
> It ends up being used for both. `llvm/project/CMakeLists.txt` calls `add_llvm_external_project`, which calls `add_llvm_subdirectory` with the `project` argument set to `LLVM` and the `type` argument set to `TOOL`, which checks the `LLVM_TOOL_*_BUILD` variable.
Oh, subtle. Thanks for explaining. I added a comment mentioning that this isn't supported here yet; if someone wants to use LLVM_TOOL_LIBCXXABI_BUILD=NO they can add support at that point :)


================
Comment at: libcxx/CMakeLists.txt:153
+      (LLVM_ENABLE_PROJECTS_USED OR NOT LLVM_ENABLE_PROJECTS STREQUAL ""))
+    if ("libcxxabi" IN_LIST LLVM_ENABLE_PROJECTS)
+      set(LIBCXX_HAVE_LIBCXXABI_CHECKOUT_INTERNAL TRUE)
----------------
smeenai wrote:
> thakis wrote:
> > thakis wrote:
> > > smeenai wrote:
> > > > What about `LLVM_ENABLE_RUNTIMES`? I think this might break that ... CC @phosek 
> > > What's the difference between LLVM_ENABLE_RUNTIMES and LLVM_ENABLE_PROJECTS? They seem redundant to me at first glance.
> > > 
> > > But I suppose this should become `if ("libcxxabi" IN_LIST LLVM_ENABLE_PROJECTS OR "libcxxabi" IN_LIST LLVM_ENABLE_RUNTIMES)`?
> > To rephrase this, what does it mean to have something in LLVM_ENABLE_RUNTIMES but not in LLVM_ENABLE_PROJECTS?
> The runtimes build does a two-stage where you build clang first and then use clang to build the runtimes. I believe that updated condition should be correct; @phosek can confirm that.
Is this documented somewhere ? What is LLVM_ENABLE_PROJECTS set to in a runtimes build?


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

https://reviews.llvm.org/D62060





More information about the libcxx-commits mailing list