diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt @@ -64,8 +64,16 @@ endif() 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(FATAL_ERROR " +No build type selected. You need to pass -DCMAKE_BUILD_TYPE= in order to configure LLVM. +Available options are: + * -DCMAKE_BUILD_TYPE=Release - For optimized build with no assertions or debug info. + * -DCMAKE_BUILD_TYPE=Debug - For unoptimized build with assertions and debug info. + * -DCMAKE_BUILD_TYPE=RelWithDebInfo - For optimized build with no assertions but with debug info. + * -DCMAKE_BUILD_TYPE=MinSizeRel - Build optimized for size instead of speed. +Learn more about these options and which value is right for your use case in our documentation: +https://llvm.org/docs/CMake.html +") endif() # Side-by-side subprojects layout: automatically set the diff --git a/llvm/docs/ReleaseNotes.rst b/llvm/docs/ReleaseNotes.rst --- a/llvm/docs/ReleaseNotes.rst +++ b/llvm/docs/ReleaseNotes.rst @@ -69,6 +69,10 @@ Changes to building LLVM ------------------------ +* Omitting CMAKE_BUILD_TYPE when using a single configuration generator is now + an error. You now have to pass -DCMAKE_BUILD_TYPE= in order to configure + LLVM. + Changes to TableGen -------------------