[libcxx-commits] [libcxx] [libc++][test] fix redefinition of _LIBCPP_HARDENING_MODE (PR #109330)
Fangrui Song via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Sep 25 11:20:48 PDT 2024
MaskRay wrote:
Historically, there are CMake options like CLANG_DEFAULT_RTLIB/CLANG_DEFAULT_PIE_ON_LINUX that customize certain default cflags/linker options. These options make CMake build system more complex and from the perspective of clangDriver maintenance, we are encouraging Clang configuration files. (There are several posts like https://blogs.gentoo.org/mgorny/2022/10/07/clang-in-gentoo-now-sets-default-runtimes-via-config-file/)
It seems that Jannik2099 has `-DLIBCXX_HARDENING_MODE=<mode>` in the default Clang configuration file, which conflicts with this libc++ setting.
One idea is to set the environment variable `CLANG_NO_DEFAULT_CONFIG`. The other is to set `-U...`.
https://github.com/llvm/llvm-project/pull/109330
More information about the libcxx-commits
mailing list