[Lldb-commits] [PATCH] D64395: [CMake] Avoid libcxxabi dependency when building LLDB from the monorepo on macOS by default

Stefan Gränitz via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jul 9 13:05:17 PDT 2019

sgraenitz abandoned this revision.
sgraenitz added a comment.

In D64395#1576738 <https://reviews.llvm.org/D64395#1576738>, @ldionne wrote:

> libc++ decides to build or not build `libc++.dylib`/`libc++.a` based on the value of `LIBCXX_ENABLE_SHARED` and `LIBCXX_ENABLE_STATIC`, if that's your question.

Sure. I was wondering whether libc++ makes assumptions based on those flags that would break, if we changed them from the outside later on.

>> Yes, I think so. Adding lldb to `LLVM_ENABLE_PROJECTS` will disable `libc++.dylib` globally, ...
> In that case, I'm really not a big fan of this approach. I think it's not good hygiene for another project to be poking at libc++'s build options like that. Those are meant to be set by end-users configuring what they want from libc++ only, not set by other projects in the monorepo. To illustrate, I think it's highly confusing if adding `-DLLVM_ENABLE_PROJECTS=lldb` suddenly disables the building of `libc++.dylib`.

I think, the condition reduces the potential harm to an acceptable minimum. But yes I agree, it's not good hygiene. We should advise everyone to use the right flags or caches.

> I think your problem might fix itself with https://reviews.llvm.org/D63883. What exactly is the problem you're trying to solve?

Yes, I think that would work. I'll drop that patch for now and wait for your fix.

**For people reading this after the fact, please pre-populate your cache with something like 1665dd63466b <https://reviews.llvm.org/rG1665dd63466b6d284c75c3543e3fdb19314d752f> or pass the flags manually.**

  rG LLVM Github Monorepo



More information about the lldb-commits mailing list