[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
Fri Jan 27 10:08:25 PST 2023


foad updated this revision to Diff 492836.
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.492836.patch
Type: text/x-patch
Size: 431 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230127/ab10d546/attachment.bin>


More information about the llvm-commits mailing list