[libcxx-commits] [libcxx] [llvm] [libcxx][CMake] Rework LLVM_ENABLE_ASSERTIONS interaction w. libcxx hardening (PR #229359)
Mészáros Gergely via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Oct 12 00:06:14 PDT 2026
Maetveis wrote:
> Ah, I see. `string(TOUPPER "_LIBCPP_HARDENING_MODE_${LIBCXX_HARDENING_MODE}" LIBCXX_HARDENING_MODE_SPELLING)` I use `LIBCXX_HARDENING_MODE` to control the llvm build setting as well.
>
> I feel much better about the patch now. I am currently thinking: in llvm HandleLLVMOptions, set `LIBCXX_HARDENING_MODE` to `extensive` if it is not specified (with a message, instead of warning). `add_compile_definitions` will add `extension` if assertion is on, and do not infer from `LIBCXX_HARDENING_MODE`. There is no need for libcxx CMake change and there is no need for auto mode.
>
> What do you think about that?
Sounds good to me, thank you! Please check c2f8339225f2fa09886ab25ddfa699a38a2f52ad if it is what you had in mind. Also please check the updated PR description too.
https://github.com/llvm/llvm-project/pull/229359
More information about the libcxx-commits
mailing list