[PATCH] D45639: [Driver] Support default libc++ library location on Darwin

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 25 12:18:07 PDT 2018

phosek added a comment.

In https://reviews.llvm.org/D45639#1078494, @thakis wrote:

> > because the headers that are part of Clang toolchain are incompatible with the system library
> Do you have details on this? This isn't supposed to be the case as far as I know. We link chrome/mac against system libc++ with the bundled headers, and it at least seems to work fine (and, from what I understand, is supposed to work as well).

We haven't ran into any incompatibility issue yet AFAIK. If backwards and forwards compatibility for libc++ headers is guaranteed, this shouldn't be an issue. The problem I'm dealing with is actually slightly different. We would like to start using C++17 and C++2a features already supported by libc++, but it's unclear which of them are already supported by libc++ shipped on macOS and we're in this case at the whim of Apple. The way we address this on Linux is by always statically linking libc++ that's shipped with Clang, but on Darwin that's currently not possible because of https://reviews.llvm.org/D44671 and this issue. Neither of those seems like a technical problem, with these two patches applied, I can statically link our copy of libc++ on Darwin and everything seems working fine.

  rC Clang


More information about the cfe-commits mailing list