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

Takuto Ikuta via libcxx-commits libcxx-commits at lists.llvm.org
Thu Apr 3 23:51:53 PDT 2025


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

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 .

>From 65271f03228bf57fbe9d3ca6f0373538cb674eed Mon Sep 17 00:00:00 2001
From: Takuto Ikuta <tikuta at google.com>
Date: Fri, 4 Apr 2025 15:32:40 +0900
Subject: [PATCH] libcxx: Add __assertion_handler as forwarding header

---
 libcxx/include/__assertion_handler | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 libcxx/include/__assertion_handler

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



More information about the libcxx-commits mailing list