[PATCH] D156377: [CMake] Use `LLVM_ENABLE_ASSERTIONS` to enable the hardened mode in libc++.
Konstantin Varlamov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 26 16:11:11 PDT 2023
var-const added a comment.
For potential future reference: this was reported by @dblaikie and @cjdb on https://reviews.llvm.org/D154997. The following command:
CC=clang CXX=clang++ cmake -G Ninja -DLLVM_ENABLE_WERROR=true -DLIBCXX_ENABLE_WERROR=true -DLLVM_BUILD_EXAMPLES=true -DCMAKE_BUILD_TYPE=Debug -DLLVM_ENABLE_ASSERTIONS=true -DLLVM_USE_SPLIT_DWARF=true -DLLVM_OPTIMIZED_TABLEGEN=true -DLLVM_ENABLE_LLD=true -DLLVM_ENABLE_PROJECTS='llvm;clang;clang-tools-extra;lld;lldb;cross-project-tests' -DLLVM_ENABLE_RUNTIMES='libcxxabi;libcxx;compiler-rt' -DLLDB_ENABLE_PYTHON=On ~/dev/llvm/src/llvm
ninja check-all
was triggering the warning about `_LIBCPP_ENABLE_ASSERTIONS` being deprecated, which becomes an error due to `-Werror`. I verified locally that with this patch, the command now succeeds. The behavior is unchanged because using `_LIBCPP_ENABLE_ASSERTIONS` now enables the hardened mode instead.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156377/new/
https://reviews.llvm.org/D156377
More information about the llvm-commits
mailing list