[clang] [CMake] Add a cache file for building a highly-optimized LLVM toolchain (PR #117802)
Tom Stellard via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 18 11:54:20 PST 2025
tstellar wrote:
> These cache files seem to be largely the same as [PGO.cmake](https://github.com/llvm/llvm-project/blob/4cec0ba92955c353c52efe728b2cfef3fbdf60f8/clang/cmake/caches/PGO.cmake), [PGO-stage2.cmake](https://github.com/llvm/llvm-project/blob/04b002bbb838bc502bd6d5f602af95efd6cc96b3/clang/cmake/caches/PGO-stage2.cmake), [PGO-stage2-instrumented.cmake](https://github.com/llvm/llvm-project/blob/04b002bbb838bc502bd6d5f602af95efd6cc96b3/clang/cmake/caches/PGO-stage2-instrumented.cmake), the only difference appears to be the inclusion of BOLT. Do we really need separate cache files for that? Could we just extend the existing files?
The main difference is that this llvm-toolchain cache is statically linking both libc++ and the compiler-rt builtins into the stage2 compiler. With the PGO.cmake file, you end up with a compiler that dynamically links gcc's libstdc++ and libgcc. The goal is to create a toolchain the relies on LLVM components as much as possible and has binaries artifacts that are easy to redistribute to a wide variety of host platforms (i.e. because they have minimal dynamic library dependencies).
https://github.com/llvm/llvm-project/pull/117802
More information about the cfe-commits
mailing list