The build will also generate the generate-coverage-report target to generate Scripts and the llvm-cov and llvm-profdata tools that pair to your compiler,
CMAKE GENERATOR CODE
LLVM_BUILD_INSTRUMENTED_COVERAGE:BOOL If enabled, source-based code coverage instrumentation See documentation for LLVM_BUILD_TOOLS above for moreĭetails. LLVM_BUILD_EXAMPLES:BOOL Build LLVM examples. See LLVM_ENABLE_SPHINX and LLVM_ENABLE_DOXYGEN. To enable a particular documentation target, see Target is run then this also enables all built documentation targets to be This results in all of the (enabled)ĭocumentation targets being as part of a normal build. Doxgyen and Sphinx targets) asĭependencies of the default build targets. LLVM_BUILD_DOCS:BOOL Adds all enabled documentation targets (i.e.
LLVM_BUILD_BENCHMARKS:BOOL Adds benchmarks to the list of default targets. This option isĪvailable only on some 64-bit Unix systems. LLVM_BUILD_32_BITS:BOOL Build 32-bit executables and libraries on 64-bit systems. Need revision info can disable this option to avoid re-linking most binariesĪfter a branch switch. The version info is provided by the LLVM_REVISION macro in LLVM_APPEND_VC_REV:BOOL Embed version control revision info (Git revision id). When OFF it is instead replaced with a guaranteed “trap”. Llvm_unreachable() is considered “undefined behavior” and optimized as (when assertions are disabled in general). LLVM_UNREACHABLE_OPTIMIZE:BOOL This flag controls the behavior of llvm_unreachable() in release build Is not ABI compatible with a version built without it. A version of LLVM built with ABI breaking checks (off) irrespective of whether normal ( NDEBUG-based) assertions areĮnabled or not. WITH_ASSERTS turns on ABI breaking checks in anĪssertion enabled build. Allowed values are WITH_ASSERTS (default), FORCE_ON andįORCE_OFF. LLVM_ABI_BREAKING_CHECKS:STRING Used to decide if LLVM should be built with ABI breaking checks or If you want to build LLVM as a shared library, you should use the For instance use lld withīUILD_SHARED_LIBS is only recommended for use by LLVM developers. LLVM_USE_LINKER:STRING Override the system’s default linker. Your native target with, for example, -DLLVM_TARGETS_TO_BUILD=X86. LLVM_TARGETS_TO_BUILD:STRING Control which targets are enabled. Into swap, permit only one link job per 15GB of RAM available on aģ2GB machine, specify -G Ninja -DLLVM_PARALLEL_LINK_JOBS=2. These options, when you use the Ninja generator, allow you CMAKE_JOBS:STRING Building the llvm toolchain can use a lot of resources, particularly CMAKE_INSTALL_PREFIX:PATH Path where LLVM will be installed when the “install” target is built. If you are using an IDE such as Visual Studio or Xcode, you should use To override the default from CMAKE_BUILD_TYPE. You can manually set LLVM_ENABLE_ASSERTIONS They typically slowĭown LLVM and Clang when enabled, but can be useful during development.
CMAKE GENERATOR FULL
For full documentation, consult the CMake manual, Here are some of the CMake variables that are used often, along with aīrief explanation. You mayĪlso wish to control which targets LLVM enables, or which LLVMĬomponents are built see the Frequently Used LLVM-relatedĪfter CMake has finished running, proceed to use IDE project files, or start Tool for instructions, see the Usage section, below. To build MinGW makefiles if you have a POSIX shell reachable through the PATHĮnvironment variable, for instance. Itself is the correct one for your development environment. You intend to use is the only one reachable from the shell, and that the shell In this case, make sure that the toolset that This can fail if CMake can’t detect your toolset, or if it thinks that theĮnvironment is not sane enough. See the Options and variables section forĪ list of build parameters that you can modify. CMake will use default valuesįor all build parameters. Generate the files required for building LLVM.
CMAKE GENERATOR SERIES
CMake will detect your development environment, perform a series of tests, and