-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[libc++] Add __assertion_handler as forwarding header #134351
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
Conversation
@llvm/pr-subscribers-libcxx Author: Takuto Ikuta (atetubou) ChangesAfter #131031, Clang modules build failes in chromium as we use libcxx directory directly like below.
To fix this error, I added Full diff: https://github.com/llvm/llvm-project/pull/134351.diff 1 Files Affected:
diff --git a/libcxx/include/__assertion_handler b/libcxx/include/__assertion_handler
new file mode 100644
index 0000000000000..b5eb532859476
--- /dev/null
+++ b/libcxx/include/__assertion_handler
@@ -0,0 +1,15 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___ASSERTION_HANDLER
+#define _LIBCPP___ASSERTION_HANDLER
+
+#include_next <__assertion_handler> // Note: this include is generated by CMake and is potentially vendor-provided.
+
+#endif // _LIBCPP___ASSERTION_HANDLER
|
@ldionne do you think this is acceptable PR to llvm repository? |
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.
49203db
to
13d936d
Compare
This looks more like you're building libc++ wrong to me. The |
But #131031 requires Currently, we have a libcxx subdrectory folk in https://chromium.googlesource.com/chromium/llvm-project/libcxx/, and using Or do you think we should fix how we build libc++ in our side? |
Yes. CMake is the only supported build tool, and we expect anybody using libc++ to use the same layout as we generate with CMake if you want to use your own build tool. I don't know exactly how you build your stuff, but it shouldn't be impossible to put your |
OK, I'll update chromium's build config so that llvm doesn't need to have this kind of change. |
After #131031, Clang modules build fails in chromium as we use libcxx directory directly like below.
To fix this error, I added
__assertion_handler
as a forward header for our usage.