Lines Matching full:build
2 Advanced Build Configurations
11 `CMake <http://www.cmake.org/>`_ is a cross-platform build-generator tool. CMake
12 does not build the project, it generates the files needed by your build tool
22 Many of the build configurations mentioned on this documentation page can be
24 file that sets the necessary flags for a specific build configuration. The caches
32 The Clang CMake build system supports bootstrap (aka multi-stage) builds. At a
33 high level a multi-stage build is a chain of builds that pass data from one
35 bootstrap build.
37 In a simple two-stage bootstrap build, we build clang using the system compiler,
38 then use that just-built clang to build clang again. In CMake this simplest form
39 of a bootstrap build can be configured with a single option,
68 CMake options starting by ``BOOTSTRAP_`` will be passed only to the stage2 build.
69 This gives the opportunity to use Clang specific build flags.
71 the stage2 build for C and C++.
77 The clang build system refers to builds as stages. A stage1 build is a standard
78 build using the compiler installed on the host, and a stage2 build is built
80 general a stage*n* build is built using the output from stage*n-1*.
86 bootstrapping scenario. Apple Clang is built using a 2-stage build.
89 compiler is a balance of optimization vs build time because it is a throwaway.
93 configuration the Apple Clang build settings are contained in CMake Cache files.
94 You can build an Apple Clang compiler using the following commands:
105 When you build the stage2-distribution target it builds the minimal stage1
111 build configurations.
120 At a high level, the way PGO works is that you build an instrumented compiler,
136 the build, particularly the PGO_INSTRUMENT_LTO option. Setting this option to
138 the performance gains from a PGO build by enabling interprocedural
139 optimizations. For example, to run a CMake configuration for a PGO build
166 stage two build. And the CLANG_PGO_TRAINING_DEPS option let's you specify
167 additional build targets to build before building the external project. The
168 LLVM Test Suite requires compiler-rt to build, so we need to add the
172 will automatically build the stage1 compiler, build the instrumented compiler
181 build directory. This takes a really long time because it builds clang twice,
182 and you *must* have compiler-rt in your build tree.
192 <build dir>/tools/clang/stage2-instrumented-bins/utils/perf-training/clang.profdata
194 You can feed that file into the LLVM_PROFDATA_FILE option when you build your
197 It may be necessary to build additional targets before running perf training, such as
213 llvm-profdata) then uses that compiler to build an instrumented stage2 compiler.
221 compiler with the stage2 profdata to build a PGO-optimized compiler.
243 at the binary level. There are also CMake caches available to build
246 To configure a single-stage build that builds LLVM/Clang and then optimizes
253 Then, build the BOLT-optimized binary by running the following ninja command:
259 If you're seeing errors in the build process, try building with a recent
264 significant runtime speedup. To configure a three stage PGO build with ThinLTO
276 Then, to build the final optimized binary, build the stage2-clang-bolt target:
289 be a three stage build. The idea of a three stage build is you take your sources
290 and build a compiler (stage1), then use that compiler to rebuild the sources
292 (stage3) with an identical configuration to the stage2 build. At the end of
304 After the build you can compare the stage2 and stage3 compilers.