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

Slava Zakharin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 1 09:04:47 PST 2023


vzakhari added a comment.

In D142279#4096350 <https://reviews.llvm.org/D142279#4096350>, @foad wrote:

> In D142279#4090165 <https://reviews.llvm.org/D142279#4090165>, @rovka wrote:
>
>> EDIT: I asked on the flang slack instance, hopefully we'll get an opinion from someone more actively involved.
>
> Thanks! The consensus on slack seemed to be that we should disable assertions (maybe just libstdc++ assertions?) in the runtime library. Does anyone know how to implement that in cmake? I experimented with remove_definitions(_GLIBCXX_ASSERTIONS) in flang/runtime/CMakeLists.txt but couldn't get it to work.

You may try to modify `COMPILE_DEFINITIONS` property of the runtime library target or try adding `-D` in `remove_definitions(-D_GLIBCXX_ASSERTIONS)`.

In both cases, I think, you may have to account for `-D` vs `/D` difference.


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