Skip to content

Commit 7134163

Browse files
jayfoadakyrtzi
authored andcommitted
[cmake] Use LLVM_ENABLE_ASSERTIONS to enable assertions in libstdc++
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. Differential Revision: https://reviews.llvm.org/D142279 (cherry picked from commit b4d51ea)
1 parent 18aa09a commit 7134163

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/cmake/modules/HandleLLVMOptions.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ if( LLVM_ENABLE_ASSERTIONS )
8383
endforeach()
8484
endif()
8585
endif()
86+
# Enable assertions in libstdc++.
87+
add_compile_definitions(_GLIBCXX_ASSERTIONS)
8688
endif()
8789

8890
if(LLVM_ENABLE_EXPENSIVE_CHECKS)

0 commit comments

Comments
 (0)