[libcxx-commits] [PATCH] D136770: [libc++abi][CMake] Handle build type RelWithDebInfo configuration similarly to Release
Xing Xue via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Oct 26 09:02:22 PDT 2022
xingxue created this revision.
xingxue added reviewers: ldionne, MaskRay, phosek, daltenty.
xingxue added a project: LLVM.
Herald added a subscriber: StephenFan.
Herald added a project: All.
xingxue requested review of this revision.
Herald added a project: libc++abi.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++abi.
This patch is similar to the change in libunwind (D124912 <https://reviews.llvm.org/D124912>) to make sure assertions is enabled in the build if `LIBCXXABI_ENABLE_ASSERTIONS` is set (which it is by default), when building in `RelWithDebInfo` configurations.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D136770
Files:
libcxxabi/CMakeLists.txt
Index: libcxxabi/CMakeLists.txt
===================================================================
--- libcxxabi/CMakeLists.txt
+++ libcxxabi/CMakeLists.txt
@@ -342,11 +342,11 @@
endif()
# On Release builds cmake automatically defines NDEBUG, so we
# explicitly undefine it:
- if (uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE")
+ if (NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
list(APPEND LIBCXXABI_COMPILE_FLAGS -UNDEBUG)
endif()
else()
- if (NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE")
+ if (uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
list(APPEND LIBCXXABI_COMPILE_FLAGS -DNDEBUG)
endif()
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136770.470824.patch
Type: text/x-patch
Size: 646 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20221026/5ea1d074/attachment.bin>
More information about the libcxx-commits
mailing list