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

Petr Hosek via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon May 20 11:54:07 PDT 2019


phosek added inline comments.


================
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)
----------------
thakis wrote:
> 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?
`LLVM_ENABLE_PROJECTS` contains projects that are being built using the host compiler, `LLVM_ENABLE_RUNTIMES` contains projects that are being built using Clang that's built as part of the same build.

In our toolchain build for example, we would use:
```
-DLLVM_ENABLE_PROJECTS=clang;clang-tools-extra;lld -DLLVM_ENABLE_RUNTIMES=compiler-rt;libcxx;libcxxabi;libunwind
```
This means we build `clang`, `clang-tools-extra` and `lld` using the host compiler, and then use those to build `compiler-rt`, `libcxx`, `libcxxabi` and `libunwind` for all targets we support.


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

https://reviews.llvm.org/D62060





More information about the libcxx-commits mailing list