Author: Martin Storsjö
Date: 2022-05-04T22:55:01+03:00
New Revision: f1f8899a18822ede04d8f90cbdae29d66333d7dc

URL: 
https://github.com/llvm/llvm-project/commit/f1f8899a18822ede04d8f90cbdae29d66333d7dc
DIFF: 
https://github.com/llvm/llvm-project/commit/f1f8899a18822ede04d8f90cbdae29d66333d7dc.diff

LOG: [libunwind] [CMake] Handle the RelWithDebInfo configuration similarly to 
Release

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.

Differential Revision: https://reviews.llvm.org/D124912

Added: 
    

Modified: 
    libunwind/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/libunwind/CMakeLists.txt b/libunwind/CMakeLists.txt
index 6a76917ae91b9..632316bc5065c 100644
--- a/libunwind/CMakeLists.txt
+++ b/libunwind/CMakeLists.txt
@@ -295,11 +295,11 @@ if (LIBUNWIND_ENABLE_ASSERTIONS)
 
   # 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()


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to