llvm-capstone/clang/cmake/caches
Alex Brachet c7cc756ce3 [CMake] Add option to disable driver build in Fuchsia cache file
Linking the driver binary can take a long time, particularly with debug
info. This adds an option to disable the driver build meant for local use.

Differential Revision: https://reviews.llvm.org/D159130
2023-09-05 15:22:15 +00:00
..
3-stage-base.cmake Update PGO and 3-stage cache files 2022-04-27 14:41:56 -05:00
3-stage.cmake
Android-stage2.cmake Revert "[cmake] Use CMAKE_INSTALL_LIBDIR too" 2022-08-18 22:46:32 -04:00
Android.cmake Revert "[cmake] Use CMAKE_INSTALL_LIBDIR too" 2022-08-18 22:46:32 -04:00
Apple-stage1.cmake
Apple-stage2-ThinLTO.cmake
Apple-stage2.cmake [clang] Explicitly add libcxx and libcxxabi runtimes during Stage2 builds 2022-08-24 09:13:29 -04:00
BaremetalARM.cmake
BOLT-PGO.cmake [Clang][CMake] Set up distribution target for Clang-BOLT 2023-02-07 15:06:15 -08:00
BOLT.cmake [Clang][CMake] Remove GCC option override in BOLT.cmake 2023-08-29 19:41:03 -07:00
CrossWinToARMLinux.cmake [CMake] Update cache file for Win to ARM Linux cross toolchain builders. NFC. 2022-10-06 19:40:33 -07:00
DistributionExample-stage2.cmake
DistributionExample.cmake
Fuchsia-stage2.cmake [CMake] Add option to disable driver build in Fuchsia cache file 2023-09-05 15:22:15 +00:00
Fuchsia.cmake [CMake] Allow enabling Python in Fuchsia LLDB 2023-08-25 16:45:05 -07:00
HLSL.cmake [CMake] Add CLANG_ENABLE_HLSL CMake option 2022-09-27 12:33:22 -05:00
MultiDistributionExample.cmake Fixed a number of typos 2022-08-01 13:13:18 -04:00
PGO-stage2-instrumented.cmake
PGO-stage2.cmake Revert part of "[test][asan] Disable new test from D157552 on Android" 2023-08-11 15:07:29 -07:00
PGO.cmake Update PGO and 3-stage cache files 2022-04-27 14:41:56 -05:00
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.