Changing the default CMAKE_BUILD_TYPE from Debug to Release


In a thread about making the default build use LLD over BFD to avoid out of RAM errors one of the solutions most people seem to like is to change the default CMAKE_BUILD_TYPE to Release over Debug since this would be a better default for most users building LLVM.

I have now posted a diff for this over at Phab: :gear: D124153 [CMake] Change default CMAKE_BUILD_TYPE to Release (

Please let me know if there are any concerns with this change.

I’ve no objections, although I’d like to see assertions still to be enabled by default.

After discussions in the review my diff has been updated to also turn on Assertions by default if you don’t specify CMAKE_BUILD_TYPE or LLVM_ENABLE_ASSERTIONS

Are we discussing this in the revision or here?