[llvm] [cmake] Make CMAKE_BUILD_TYPE=Release the default (PR #174520)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 11 01:19:46 PST 2026
nikic wrote:
Something I'm wondering about whether it would make sense to add something like `-DLLVM_DEV_MODE=On` that's going to set an opinionated set of options optimized for development workflows. That would include things like:
* Using a release build (already the default with this change).
* Enabling assertions.
* Enabling ccache.
* Building with clang. This could be "if available", but "tells you to install clang" might actually be better, because we only guarantee warning-free builds with clang, so using gcc can be a significantly worse experience even if you ignore build times.
* Linking with lld.
* Enabling `-Werror`, if you're using a recent clang. (Though even with the compiler limitation, there's still some risk here because of libc++ vs libstdc++ differences.)
* Maybe do something like enable line-tables-only debuginfo, which is low-overhead but improves backtraces. Getting better backtraces is essentially the only reason why I ever use LLVM debug builds.
https://github.com/llvm/llvm-project/pull/174520
More information about the llvm-commits
mailing list