[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 Feb 11 01:05:10 PST 2023
foad added a comment.
In D142279#4119549 <https://reviews.llvm.org/D142279#4119549>, @dblaikie wrote:
> In D142279#4117691 <https://reviews.llvm.org/D142279#4117691>, @foad wrote:
>
>> The warning is reported here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105545
>>
>> I'm not sure what's best to do. The status quo is that you get lots of compile time warnings. We could add a check for that in the cmake scripts, and disable _GLIBCXX_ASSERTIONS, but then you would silently lose the assertions.
>
> Seems important that LLVM users can use LLVM assertions without libstdc++ assertions, since it'd put a wider restriction on their code (especially if there are bugs in some versions of libstdc++ assertions) - though having one imply the other by default seems OK too.
The part I don't understand is if you have a project that is (quote) "using LLVM as a library", why would flags defined in LLVM's cmake scripts "leak out" and affect your whole project? That just seems wrong to me. But then I really don't know anything about including cmake projects in other cmake projects.
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