[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
Thu Feb 2 04:24:05 PST 2023


foad added a comment.

In D142279#4097031 <https://reviews.llvm.org/D142279#4097031>, @vzakhari wrote:

> 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.

Thanks. I finally found something that works for me: D143168 <https://reviews.llvm.org/D143168>


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