mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-16 01:16:36 +00:00
[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]: 15fdd47c4b/libcxx/modules/CMakeLists.txt.in (L52)
This commit is contained in:
parent
2274c66e6f
commit
ed1273d4dd
@ -41,7 +41,7 @@ target_sources(std
|
||||
std.cppm
|
||||
)
|
||||
|
||||
target_include_directories(std SYSTEM PRIVATE @LIBCXX_CONFIGURED_INCLUDE_DIRS@)
|
||||
target_include_directories(std SYSTEM PUBLIC @LIBCXX_CONFIGURED_INCLUDE_DIRS@)
|
||||
|
||||
if (NOT @LIBCXX_ENABLE_EXCEPTIONS@)
|
||||
target_compile_options(std PUBLIC -fno-exceptions)
|
||||
|
Loading…
x
Reference in New Issue
Block a user