[libcxx-commits] [libcxx] [libc++] change the visibility of libc++ header to public in libcxx module (PR #91240)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu May 16 20:52:36 PDT 2024
RichardLuo0 wrote:
> Can you add a description why this change would be beneficial?
It is for the same reason as https://github.com/llvm/llvm-project/pull/91182
Consider the following file:
```cpp
#include <boost/json.hpp>
import std;
int main(int, const char **) { }
```
boost will include something from libc++, but we are using [-nostdinc++](https://github.com/RichardLuo0/llvm-project/blob/15fdd47c4b110b64dc61f636e42e0484bf8bdbe0/libcxx/modules/CMakeLists.txt.in#L52), so the compiler can not find any default std header.
Therefore the locally built header needs to be public.
Besides, if we are using assert, the `<cassert>` has to be found because assert is a macro so it can not be exported.
https://github.com/llvm/llvm-project/pull/91240
More information about the libcxx-commits
mailing list