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

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 21 13:05:03 PDT 2022


mstorsjo added a comment.

In D124153#3464965 <https://reviews.llvm.org/D124153#3464965>, @mehdi_amini wrote:

> I don't understand the rational about turning assertions on. To me changing the default is about making it easier for users who just want to **use** LLVM to get the right version running, while assertions are targeting developers.
>
> If we can't resolve the targeted audience, what about erroring out when `CMAKE_BUILD_TYPE` isn't defined?
>
>   $ cmake ../llvm
>   Error: please specify a build type:
>    -DCMAKE_BUILD_TYPE=Debug  # Unoptimized, with debug info (large binaries)
>    -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON  # Optimized, no debug info, with assertions
>    -DCMAKE_BUILD_TYPE=Release  # Optimized, no debug info, no assertions

That sounds reasonable to me too, and avoids surprising inconsistencies.


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