[PATCH] D124153: [CMake] Change default CMAKE_BUILD_TYPE to Release

Aaron Ballman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 22 05:54:53 PDT 2022


aaron.ballman added a comment.

In D124153#3467377 <https://reviews.llvm.org/D124153#3467377>, @thieta wrote:

> In D124153#3467348 <https://reviews.llvm.org/D124153#3467348>, @aaron.ballman wrote:
>
>> Personally, I think the default depends entirely on who is doing the download and from where. If people are doing a `git clone` of the `main` branch, I think they're more often developers and would want a debug build and switching to release will be a burden/surprise/annoyance. If they're snagging source from the release downloads page, they're probably not doing active development with that and would want a release build of some kind and the current behavior is a burden/surprise/annoyance. Without some measurements of how users are getting to the source in the first place, I don't think we can reasonably pick a default for all situations and call it better than the current one. It'll just be different.
>
> I don't think this is 100% true. The downside for a user doing a debug build by default is that they very often run out of RAM and diskspace because the debug build is bigger and more RAM hungry when not using a decent linker.
>
> The downside for a developer cloning and building a release build is often not utter confusion and sending questions in discord / discourse, but just rebuild with debug turned on.

I think you're hand-waving away the burden this adds to folks new to the community. The downside to the developer situation is that they waste a few hours doing a build that they can't debug, then they have to track down someone willing to tell them what they've done wrong, and then they have to do another build that will take even longer. Each one of these hurdles is a place where people can get frustrated and give up.

> I agree that it might be hard to guess "right" but the consequences are different and more confusing for people that are just getting started with LLVM.

I think both of the situations are basically the same with basically the same outcomes -- if the user picks the "correct" build target (either through the default or explicitly), they're happy, if not, they're unhappy.


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