llvm-project/clang/cmake/caches
Petr Hosek fbcce9fe9d [CMake] Replace the sanitizer support in runtimes build with multilib
This is a more generic solution; while the sanitizer support can be used
only for sanitizer instrumented builds, the multilib support can be used
to build other variants such as noexcept which is what we would like to use
in Fuchsia.

The name CMake target name uses the target name, same as for the regular
runtimes build and the name of the multilib, concatenated with '+'. The
libraries are installed in a subdirectory named after the multilib.

Differential Revision: https://reviews.llvm.org/D60926

llvm-svn: 358935
2019-04-22 23:31:39 +00:00
..
3-stage-base.cmake
3-stage.cmake
Android-stage2.cmake [CMake] Add Android toolchain CMake cache files. 2017-07-28 17:40:28 +00:00
Android.cmake [CMake] Add Android toolchain CMake cache files. 2017-07-28 17:40:28 +00:00
Apple-stage1.cmake Explicitly say we don't define new/delete in libc++ during Apple stage1 bootstrap 2019-04-17 14:58:59 +00:00
Apple-stage2-ThinLTO.cmake Add a cmake cache file for a stage-2 build with ThinLTO 2017-03-09 01:18:31 +00:00
Apple-stage2.cmake [CMake] Tell libc++ that we're using compiler-rt on Apple platforms 2019-03-12 15:32:00 +00:00
BaremetalARM.cmake [build] Rename clang-headers to clang-resource-headers 2019-03-04 21:19:53 +00:00
DistributionExample-stage2.cmake [build] Rename clang-headers to clang-resource-headers 2019-03-04 21:19:53 +00:00
DistributionExample.cmake Fix two-stage build on windows using DistributionExample cmake cache 2017-05-11 13:19:24 +00:00
Fuchsia-stage2.cmake [CMake] Replace the sanitizer support in runtimes build with multilib 2019-04-22 23:31:39 +00:00
Fuchsia.cmake [CMake][Fuchsia] Pass -ldl -lpthread LDFLAGS to second stage 2019-02-12 16:24:46 +00:00
PGO-stage2-instrumented.cmake [CMake] Adding toolchain targets to PGO and Apple CMake caches 2016-08-17 21:51:38 +00:00
PGO-stage2.cmake
PGO.cmake [CMake] Support thin LTO in PGO CMake cache 2016-10-19 21:12:04 +00:00
README.txt

README.txt

CMake Caches
============

This directory contains CMake cache scripts that pre-populate the CMakeCache in
a build directory with commonly used settings.

You can use the caches files with the following CMake invocation:

cmake -G <build system>
  -C <path to cache file>
  [additional CMake options (i.e. -DCMAKE_INSTALL_PREFIX=<install path>)]
  <path to llvm>

Options specified on the command line will override options in the cache files.

The following cache files exist.

Apple-stage1
------------

The Apple stage1 cache configures a two stage build similar to how Apple builds
the clang shipped with Xcode. The build files generated from this invocation has
a target named "stage2" which performs an LTO build of clang.

The Apple-stage2 cache can be used directly to match the build settings Apple
uses in shipping builds without doing a full bootstrap build.

PGO
---

The PGO CMake cache can be used to generate a multi-stage instrumented compiler.
You can configure your build directory with the following invocation of CMake:

cmake -G <generator> -C <path_to_clang>/cmake/caches/PGO.cmake <source dir>

After configuration the following additional targets will be generated:

stage2-instrumented:
Builds a stage1 x86 compiler, runtime, and required tools (llvm-config,
llvm-profdata) then uses that compiler to build an instrumented stage2 compiler.

stage2-instrumented-generate-profdata:
Depends on "stage2-instrumented" and will use the instrumented compiler to
generate profdata based on the training files in <clang>/utils/perf-training

stage2:
Depends on "stage2-instrumented-generate-profdata" and will use the stage1
compiler with the stage2 profdata to build a PGO-optimized compiler.

stage2-check-llvm:
Depends on stage2 and runs check-llvm using the stage3 compiler.

stage2-check-clang:
Depends on stage2 and runs check-clang using the stage3 compiler.

stage2-check-all:
Depends on stage2 and runs check-all using the stage3 compiler.

stage2-test-suite:
Depends on stage2 and runs the test-suite using the stage3 compiler (requires
in-tree test-suite).

3-stage
-------

This cache file can be used to generate a 3-stage clang build. You can configure
using the following CMake command:

cmake -C <path to clang>/cmake/caches/3-stage.cmake -G Ninja <path to llvm>

You can then run "ninja stage3-clang" to build stage1, stage2 and stage3 clangs.

This is useful for finding non-determinism the compiler by verifying that stage2
and stage3 are identical.