[libcxx-commits] [libcxx] Introduce __config_epilogue suitable for #undef-ing certain defines from __config (PR #93015)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed May 22 03:32:24 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: Yuriy Chernyshov (georgthegreat)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/93015.diff
3 Files Affected:
- (modified) libcxx/include/CMakeLists.txt (+1)
- (modified) libcxx/include/__config (+2)
- (added) libcxx/include/__config_epilogue.in (+12)
``````````diff
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
``````````
</details>
https://github.com/llvm/llvm-project/pull/93015
More information about the libcxx-commits
mailing list