[PATCH] D142279: [cmake] Use LLVM_ENABLE_ASSERTIONS to enable assertions in libstdc++

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 2 04:23:06 PST 2023


foad updated this revision to Diff 494253.
foad added a comment.

Rebase.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142279

Files:
  llvm/cmake/modules/HandleLLVMOptions.cmake


Index: llvm/cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- llvm/cmake/modules/HandleLLVMOptions.cmake
+++ llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -81,6 +81,8 @@
       endforeach()
     endif()
   endif()
+  # Enable assertions in libstdc++.
+  add_compile_definitions($<$<COMPILE_LANGUAGE:CXX>:_GLIBCXX_ASSERTIONS>)
 endif()
 
 if(LLVM_ENABLE_EXPENSIVE_CHECKS)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142279.494253.patch
Type: text/x-patch
Size: 431 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230202/fe68fa16/attachment.bin>


More information about the llvm-commits mailing list