[PATCH] D124153: [CMake] Change default CMAKE_BUILD_TYPE to Release
Erich Keane via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 22 12:18:15 PDT 2022
erichkeane added a comment.
In D124153#3468557 <https://reviews.llvm.org/D124153#3468557>, @tstellar wrote:
> In D124153#3468477 <https://reviews.llvm.org/D124153#3468477>, @erichkeane wrote:
>
>> If you want a 'right' default, it has to be 'the one that most users of cmake WANT'. I posit that is 'default' or 'release with debug info + asserts', since MOST direct users of our cmake scripts are going to be developers. I'd find 'no default' to be a vast improvement over 'give me the wrong one'.
>
> I think the default should be for people who don't have the experience or the knowledge (yet) to know which configuration works best for them or even how to select a different one.
Right, and that includes 'new' developers trying to develop for the 1st time on LLVM, who, I again, posit WANT a debug build.
> Once people have enough knowledge to know what configuration they want, then they can pass those options to CMake and the default is no longer relevant to them. Along the same lines, the reason I don't like having no default, is you are forcing someone new to the project to pick a configuration when they may not have any idea which one is best for them. It's especially an issue when one of the options (Debug build) has a good chance to not be buildable on their system.
Your concern is 'fixed' by the documentation/diagnostic message being sufficiently detailed I believe. We're 'forcing' them to identify whether they want to 'use' the compiler, or 'develop' on the compiler. The 'right' answer is opposite for both. As long as you assert we have BOTH groups in any significance, there is no valid default.
As far as:
> is you are forcing someone new to the project to pick a configuration when they may not have any idea which one is best for them.
Our users are unique in that they are likely developers/technical themselves. If they don't know the general differences in use cases between a release and a debug build, I'm not sure picking a default will help them so much as put them in even more pain when they discover we picked wrong.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124153/new/
https://reviews.llvm.org/D124153
More information about the llvm-commits
mailing list