git: 86de9cd1f1b5 - stable/14 - Adjust LLVM_ENABLE_ABI_BREAKING_CHECKS depending on NDEBUG
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 01 Dec 2024 11:19:00 UTC
The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=86de9cd1f1b5815d3ba8923ba83053541de1bcdd commit 86de9cd1f1b5815d3ba8923ba83053541de1bcdd Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2024-10-24 09:53:19 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2024-12-01 11:17:16 +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