[libcxx-commits] [PATCH] D124912: [libunwind] [CMake] Handle the RelWithDebInfo configuration similarly to Release
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed May 4 03:00:18 PDT 2022
mstorsjo created this revision.
mstorsjo added reviewers: MaskRay, phosek.
Herald added subscribers: StephenFan, mgorny.
Herald added projects: libunwind, All.
Herald added a reviewer: libunwind.
mstorsjo requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This makes sure to include libunwind log messages in the build if
LIBUNWIND_ENABLE_ASSERTIONS is set (which it is by default), when
building in RelWithDebInfo configurations.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D124912
Files:
libunwind/CMakeLists.txt
Index: libunwind/CMakeLists.txt
===================================================================
--- libunwind/CMakeLists.txt
+++ libunwind/CMakeLists.txt
@@ -295,11 +295,13 @@
# On Release builds cmake automatically defines NDEBUG, so we
# explicitly undefine it:
- if (uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE")
+ if (uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE" OR
+ uppercase_CMAKE_BUILD_TYPE STREQUAL "RELWITHDEBINFO")
add_compile_flags(-UNDEBUG)
endif()
else()
- if (NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE")
+ if (NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE" AND
+ NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "RELWITHDEBINFO")
add_compile_flags(-DNDEBUG)
endif()
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124912.426957.patch
Type: text/x-patch
Size: 736 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220504/40844ae7/attachment.bin>
More information about the libcxx-commits
mailing list