-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[libc++] Add __assertion_handler to the modulemap #131031
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[libc++] Add __assertion_handler to the modulemap #131031
Conversation
@llvm/pr-subscribers-libcxx Author: Louis Dionne (ldionne) ChangesThat header is generated via CMake, but it is nonetheless present in the final installation, so it should be covered by the modulemap. rdar://131418726 Full diff: https://github.com/llvm/llvm-project/pull/131031.diff 1 Files Affected:
diff --git a/libcxx/include/module.modulemap b/libcxx/include/module.modulemap
index b9964dac84acd..fd87c290406a4 100644
--- a/libcxx/include/module.modulemap
+++ b/libcxx/include/module.modulemap
@@ -2285,6 +2285,7 @@ module std [system] {
}
module internal_assert {
header "__assert"
+ header "__assertion_handler" // Generated via CMake
export *
}
|
libcxx/include/module.modulemap
Outdated
@@ -2285,6 +2285,7 @@ module std [system] { | |||
} | |||
module internal_assert { | |||
header "__assert" | |||
header "__assertion_handler" // Generated via CMake |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be in a separate submodule - in general each submodule should have only a single header
statement, otherwise you "fuse" the two headers. i.e. wherever you have #include <__assertion_handler>
it'll also include __assert
which is at least unintuitive.
That header is generated via CMake, but it is nonetheless present in the final installation, so it should be covered by the modulemap. rdar://131418726
1f606d1
to
755233d
Compare
I had to make the header textual since otherwise I get:
That's because I would have to |
Can we make __assertion_handler's module |
After llvm#131031, Clang modules build fails in chromium as we use libcxx directory directly like below. ``` stderr: ../../third_party/libc++/src/include/module.modulemap:2325:12: error: header '__assertion_handler' not found 2325 | header "__assertion_handler" // generated via CMake | ^ 1 error generated. ``` To fix this error, I added `__assertion_handler` as a forward header for our usage.
That header is generated via CMake, but it is nonetheless present in the final installation, so it should be covered by the modulemap.
rdar://131418726