[libcxx-commits] [libcxx] [libcxx] Add __assertion_handler as forwarding header (PR #134351)

via libcxx-commits libcxx-commits at lists.llvm.org
Thu Apr 3 23:52:29 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libcxx

Author: Takuto Ikuta (atetubou)

<details>
<summary>Changes</summary>

After https://github.com/llvm/llvm-project/pull/131031, Clang modules build failes 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 and we'll .

---
Full diff: https://github.com/llvm/llvm-project/pull/134351.diff


1 Files Affected:

- (added) libcxx/include/__assertion_handler (+15) 


``````````diff
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

``````````

</details>


https://github.com/llvm/llvm-project/pull/134351


More information about the libcxx-commits mailing list