[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 12:50:44 PDT 2022


mstorsjo added inline comments.


================
Comment at: llvm/CMakeLists.txt:67
 if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
-  message(STATUS "No build type selected, default to Debug")
-  set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build type (default Debug)" FORCE)
+  message(STATUS "No build type selected, default to Release with assertions enabled. Use -DCMAKE_BUILD_TYPE=Debug to build with debug info")
+  set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build type (default Release)" FORCE)
----------------
aaronpuchert wrote:
> Can we make this a warning? I don't think users should rely on the default being whatever it currently is.
Should we also mention how to disable the assertions in the same sentence?


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