[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
       
    Sun Jan 22 08:03:02 PST 2023
    
    
  
foad updated this revision to Diff 491164.
foad added a comment.
Use add_compile_definitions.
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
@@ -83,6 +83,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.491164.patch
Type: text/x-patch
Size: 431 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230122/75a7fb41/attachment.bin>
    
    
More information about the llvm-commits
mailing list