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

Sergei Barannikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 21 09:04:58 PST 2023


barannikov88 added a comment.

> The summary of this patch suggests that it is indeed negligible:

And I've just finished testing a debug build (check-llvm-codegen only).
It is 1000s vs 1030s on my machine. Looks acceptable :)



================
Comment at: llvm/cmake/modules/HandleLLVMOptions.cmake:87
+  # Enable assertions in libstdc++.
+  add_definitions(-D_GLIBCXX_ASSERTIONS)
 endif()
----------------
Kind of nitpick.
This would require CMake 3.12. The current requirement is higher (3.14 and is going to be 3.20).
It would also be nice to only add this flag when compiling against libstdc++, but I don't know how to do that.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142279



More information about the llvm-commits mailing list