File tree Expand file tree Collapse file tree 2 files changed +56
-3
lines changed Expand file tree Collapse file tree 2 files changed +56
-3
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,9 @@ name: Build toolchain
22
33env :
44 LLVM_REF : " cd708029e0b2869e80abe31ddb175f7c35361f90" # 19.1.7
5+ # GH Actions are dead slow, can't build two-stage
6+ CMAKE_CACHE : " SingleStage" # ToolchainCache
7+ STAGE : " " # stage2-
58
69on :
710 push :
1417 runs-on : ${{ matrix.RUNNER }}
1518 strategy :
1619 matrix :
20+ fail-fast : false
1721 include :
1822 - ARCH : x86_64
1923 RUNNER : ubuntu-22.04
2630 OS : Darwin
2731 steps :
2832 - uses : actions/checkout@v5
33+ -
uses :
hendrikmuhs/[email protected] 34+ with :
35+ max-size : " 5000MB"
2936 - uses : actions/checkout@v5
3037 with :
3138 repository : ' llvm/llvm-project'
@@ -44,11 +51,11 @@ jobs:
4451 mkdir build.dir
4552 cmake -G Ninja \
4653 -B build.dir \
47- -C ToolchainCache .cmake \
54+ -C ${{ env.CMAKE_CACHE }} .cmake \
4855 llvm/llvm \
4956 -DCMAKE_INSTALL_PREFIX=${{ matrix.OS }}-${{ matrix.ARCH }}.toolchain
50- cmake --build build.dir --target stage2- distribution
51- cmake --build build.dir --target stage2- install-distribution
57+ cmake --build build.dir --target ${{ env.STAGE }} distribution
58+ cmake --build build.dir --target ${{ env.STAGE }} install-distribution
5259 tar -czvf \
5360 ${{ matrix.OS }}-${{ matrix.ARCH }}.toolchain.tar.gz \
5461 ${{ matrix.OS }}-${{ matrix.ARCH }}.toolchain
Original file line number Diff line number Diff line change 1+ # Based on clang/cmake/caches/DistributionExample-stage2.cmake
2+
3+ set (LLVM_ENABLE_PROJECTS "clang;clang-tools-extra;lld" CACHE STRING "" )
4+ set (LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind" CACHE STRING "" )
5+
6+ set (LLVM_TARGETS_TO_BUILD X86;ARM;AArch64 CACHE STRING "" )
7+ set (LLVM_INSTALL_TOOLCHAIN_ONLY ON CACHE BOOL "" )
8+ set (LLVM_CCACHE_BUILD ON CACHE BOOL "" )
9+ set (LLVM_ENABLE_ZSTD OFF CACHE BOOL "" )
10+ set (LLVM_ENABLE_TERMINFO OFF CACHE BOOL "" )
11+ set (LLVM_ENABLE_ZLIB OFF CACHE BOOL "" )
12+
13+ set (CMAKE_BUILD_TYPE Release CACHE STRING "" )
14+
15+ if (APPLE )
16+ set (libtool_darwin llvm-libtool-darwin)
17+ endif ()
18+
19+ # setup toolchain
20+ set (LLVM_INSTALL_TOOLCHAIN_ONLY ON CACHE BOOL "" )
21+ set (LLVM_TOOLCHAIN_TOOLS
22+ ${libtool_darwin}
23+ clang-format
24+ clang-tidy
25+ llvm-ar
26+ llvm-dwp
27+ llvm-nm
28+ llvm-objcopy
29+ llvm-objdump
30+ llvm-profdata
31+ llvm-ranlib
32+ llvm-strip
33+ llvm-symbolizer
34+
35+ CACHE STRING "" )
36+
37+ set (LLVM_DISTRIBUTION_COMPONENTS
38+ clang
39+ LTO
40+ lld
41+ clang-format
42+ clang-resource -headers
43+ builtins
44+ runtimes
45+ ${LLVM_TOOLCHAIN_TOOLS}
46+ CACHE STRING "" )
You can’t perform that action at this time.
0 commit comments