[libcxx-commits] [libcxx] Introduce __config_epilogue suitable for #undef-ing certain defines from __config (PR #93015)

Yuriy Chernyshov via libcxx-commits libcxx-commits at lists.llvm.org
Wed May 22 03:31:52 PDT 2024


https://github.com/georgthegreat created https://github.com/llvm/llvm-project/pull/93015

None

>From 088401f19480fb11f075e7927346c45dc7f069b0 Mon Sep 17 00:00:00 2001
From: Yuriy Chernyshov <thegeorg at yandex-team.com>
Date: Wed, 22 May 2024 13:31:23 +0300
Subject: [PATCH] Introduce __config_epilogue suitable for #undef-ing certain
 defines from __config

---
 libcxx/include/CMakeLists.txt       |  1 +
 libcxx/include/__config             |  2 ++
 libcxx/include/__config_epilogue.in | 12 ++++++++++++
 3 files changed, 15 insertions(+)
 create mode 100644 libcxx/include/__config_epilogue.in

diff --git a/libcxx/include/CMakeLists.txt b/libcxx/include/CMakeLists.txt
index 954e0c04ec858..65b69c4cdcef8 100644
--- a/libcxx/include/CMakeLists.txt
+++ b/libcxx/include/CMakeLists.txt
@@ -1025,6 +1025,7 @@ set(files
   )
 
 configure_file("__config_site.in" "${LIBCXX_GENERATED_INCLUDE_TARGET_DIR}/__config_site" @ONLY)
+configure_file("__config_epilogie.in" "${LIBCXX_GENERATED_INCLUDE_TARGET_DIR}/__config_epilogue" @ONLY)
 configure_file("${LIBCXX_ASSERTION_HANDLER_FILE}" "${LIBCXX_GENERATED_INCLUDE_DIR}/__assertion_handler" COPYONLY)
 
 set(_all_includes "${LIBCXX_GENERATED_INCLUDE_TARGET_DIR}/__config_site"
diff --git a/libcxx/include/__config b/libcxx/include/__config
index 104a244cc82cc..c9ec5aa06feea 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -1462,4 +1462,6 @@ typedef __char32_t char32_t;
 
 #endif // __cplusplus
 
+#include <__config_epilogue>
+
 #endif // _LIBCPP___CONFIG
diff --git a/libcxx/include/__config_epilogue.in b/libcxx/include/__config_epilogue.in
new file mode 100644
index 0000000000000..c1ad00615e50d
--- /dev/null
+++ b/libcxx/include/__config_epilogue.in
@@ -0,0 +1,12 @@
+//===----------------------------------------------------------------------===//
+//
+// 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___CONFIG_SITE
+#define _LIBCPP___CONFIG_SITE
+
+#endif // _LIBCPP___CONFIG_SITE



More information about the libcxx-commits mailing list