[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 09:36:51 PDT 2022


aaron.ballman added a comment.

In D124153#3467906 <https://reviews.llvm.org/D124153#3467906>, @tstellar wrote:

> The target audience for the default configuration should be people who are new to the project, it could be users or it could be developers.  It also could be people with very little experience programming or building from code from source.  We want to keep the barrier for entry as low as possible for this group of people.  We can have the best documentation or have verbose error messages to help guide them in the right direction, but the best way to communicate to new users about how to build the project is to have a sensible default configuration.

I agree with almost every point, right up until "have a sensible default configuration"; I don't think it's possible to have a default configuration that is sensible to both users and developers. Well, I take that back. I think it *is* possible, but I think we would have to invest significant effort in improving the LLVM compilation performance issues so that you don't need a super computer to build the project. My understanding is *that* is what's most off-putting to new folks, whether they're users or developers, and that's somewhat (but not entirely) orthogonal to the default build mode.

I think the current build mode is *defensible* (as is switching to release instead of debug by default), which is about the best we'll get.

> I also don't think we should worry about people who complain about the default build configuration.  If someone has enough understanding of the project to know that the default configuration is not the best for them, then they have enough understanding to change the configuration.  The defaults should be designed for people who may not (yet) know anything about build types, debug info, assertions, and who just want to get started using and participating in the project.

Strong +1.

My recommendation is: leave the default build type alone; there's existing documentation, blog posts, stack overflow questions, etc that assume the default build type as it is today, so let's not invalidate that (which would likely add to confusion for folks new to the project hunting around for answers in their favorite search engine). Instead, let's improve our own documentation as best we can under the assumption that the most likely place a confused user will find an answer to build configuration questions will be our own docs.


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