[cmake] Make CMAKE_BUILD_TYPE=Release the default (#174520) Currently, we report a fatal error if the user leaves CMAKE_BUILD_TYPE blank. This was implemented in https://reviews.llvm.org/D124153 / 350bdf9227ceb , based on this RFC: https://discourse.llvm.org/t/rfc-select-a-better-linker-by-default-or-warn-about-using-bfd/61899/1 Tom Stellard mentioned that he'd like to revisit this on Discord, and Aiden, myself, and apparently most people on the original RFC agree, so I'm proposing we do it. However, on the review, several folks objected and insisted that Debug was a better default. I want to reopen the question. I think we've made the wrong tradeoff. I wish Debug builds worked out of the box on most systems, but they don't, and LLVM has only gotten bigger over the last four years, making the build scalability problems of Debug builds worse. I think we should optimize our build configuration for new developers, not experienced longtime contributors who are invested enough to tweak the build to their liking. With this PR, we emit a warning, and set the build type to Release, which has a higher likelihood of success for first-time users. Making the build work out of the box is very important for making LLVM development more accessible to new contributors, so it seems worth smoothing over this rough edge. A separate possible improvement would be to set LLVM_ENABLE_ASSERTIONS=ON, but that is out of scope for this PR.
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.