git: 44be5a00bedd - stable/13 - Adjust LLVM_ENABLE_ABI_BREAKING_CHECKS depending on NDEBUG
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 01 Dec 2024 12:54:33 UTC
The branch stable/13 has been updated by dim:
URL: https://cgit.FreeBSD.org/src/commit/?id=44be5a00bedd95e39d20f7dc6d5458251af49e20
commit 44be5a00bedd95e39d20f7dc6d5458251af49e20
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-10-24 09:53:19 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-12-01 12:32:46 +0000
Adjust LLVM_ENABLE_ABI_BREAKING_CHECKS depending on NDEBUG
When assertions are disabled, the upstream build system disables
LLVM_ENABLE_ABI_BREAKING_CHECKS by default. Though the upstream build
system allows it to be force-enabled, it looks like that is not a
well-tested build-time configuration.
Therefore, always disable LLVM_ENABLE_ABI_BREAKING_CHECKS when
assertions are disabled, which will also save some more runtime cost
when people use WITHOUT_LLVM_ASSERTIONS.
PR: 280562
MFC after: 1 month
(cherry picked from commit 1c83996beda7b6a382857c318f46daefcb6bd84c)
---
lib/clang/include/llvm/Config/abi-breaking.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/clang/include/llvm/Config/abi-breaking.h b/lib/clang/include/llvm/Config/abi-breaking.h
index eb90be1fe37b..55e67e2ebad7 100644
--- a/lib/clang/include/llvm/Config/abi-breaking.h
+++ b/lib/clang/include/llvm/Config/abi-breaking.h
@@ -13,7 +13,11 @@
#define LLVM_ABI_BREAKING_CHECKS_H
/* Define to enable checks that alter the LLVM C++ ABI */
+#ifdef NDEBUG
+#define LLVM_ENABLE_ABI_BREAKING_CHECKS 0
+#else
#define LLVM_ENABLE_ABI_BREAKING_CHECKS 1
+#endif
/* Define to enable reverse iteration of unordered llvm containers */
#define LLVM_ENABLE_REVERSE_ITERATION 0