[PATCH] D124153: [CMake] Change default CMAKE_BUILD_TYPE to Release
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 21 09:17:54 PDT 2022
MaskRay 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
I agree that we should not turn assertions on when CMAKE_BUILD_TYPE is unspecified.
My rationale is more about: we decide to let empty CMAKE_BUILD_TYPE behave like Release, adding more magic behind it may be adding confusion.
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