[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 11:12:38 PDT 2022


mstorsjo updated this revision to Diff 427073.
mstorsjo added a comment.

Restructured to check `NOT STREQUAL "DEBUG"` instead of enumerating the release modes, matching a similar check in llvm/cmake/modules/HandleLLVMOptions.cmake. I'll push this later if there's no further comments on it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124912/new/

https://reviews.llvm.org/D124912

Files:
  libunwind/CMakeLists.txt


Index: libunwind/CMakeLists.txt
===================================================================
--- libunwind/CMakeLists.txt
+++ libunwind/CMakeLists.txt
@@ -295,11 +295,11 @@
 
   # 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")
     add_compile_flags(-UNDEBUG)
   endif()
 else()
-  if (NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE")
+  if (uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
     add_compile_flags(-DNDEBUG)
   endif()
 endif()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124912.427073.patch
Type: text/x-patch
Size: 601 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220504/8b11353d/attachment-0001.bin>


More information about the libcxx-commits mailing list