[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
Sat Jan 21 02:43:31 PST 2023
foad created this revision.
foad added reviewers: scott.linder, lebedev.ri.
Herald added a subscriber: StephenFan.
Herald added a project: All.
foad requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
On my machine this showed no new failures in check-llvm and increased
the testing time from 138 to 142 seconds, for a Release build with
assertions enabled.
Repository:
rG LLVM Github Monorepo
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_definitions(-D_GLIBCXX_ASSERTIONS)
endif()
if(LLVM_ENABLE_EXPENSIVE_CHECKS)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142279.491058.patch
Type: text/x-patch
Size: 398 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230121/c2e438c2/attachment.bin>
More information about the llvm-commits
mailing list