Skip to content

Commit ed1273d

Browse files
authored
[libc++] change the visibility of libc++ header to public in libcxx module (#91240)
This PR addresses a problem that headers may not be able to be found if `#include` is used with std modules. Consider the following file: #include <boost/json.hpp> import std; int main(int, const char **) { } Boost will include something from libc++, but we are using -nostdinc++ at [1] so the compiler can not find any default std header. Therefore the locally built header needs to be public. [1]: https://github.com/RichardLuo0/llvm-project/blob/15fdd47c4b110b64dc61f636e42e0484bf8bdbe0/libcxx/modules/CMakeLists.txt.in#L52
1 parent 2274c66 commit ed1273d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcxx/modules/CMakeLists.txt.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ target_sources(std
4141
std.cppm
4242
)
4343

44-
target_include_directories(std SYSTEM PRIVATE @LIBCXX_CONFIGURED_INCLUDE_DIRS@)
44+
target_include_directories(std SYSTEM PUBLIC @LIBCXX_CONFIGURED_INCLUDE_DIRS@)
4545

4646
if (NOT @LIBCXX_ENABLE_EXCEPTIONS@)
4747
target_compile_options(std PUBLIC -fno-exceptions)

0 commit comments

Comments
 (0)