File tree Expand file tree Collapse file tree 2 files changed +56
-1
lines changed Expand file tree Collapse file tree 2 files changed +56
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Build LLVM
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ tags :
7+ - " llvm-*"
8+
9+ jobs :
10+ build :
11+ runs-on : macos-latest
12+ steps :
13+ - uses : actions/checkout@v4
14+
15+ - name : Fetch LLVM
16+ run : git clone https://github.com/llvm/llvm-project.git
17+
18+ - name : Set LLVM version
19+ run : cd llvm-project && git checkout llvmorg-21.1.0
20+
21+ - name : Configure
22+ run : |
23+ cmake -S llvm-project/llvm -B build -G Ninja \
24+ -DCMAKE_BUILD_TYPE=Release \
25+ -DLLVM_ENABLE_PROJECTS="lld" \
26+ -DLLVM_TARGETS_TO_BUILD="X86;AArch64" \
27+ -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \
28+ -DLLVM_ENABLE_RTTI=True \
29+ -DCMAKE_INSTALL_PREFIX=$PWD/install
30+
31+ - name : Build
32+ run : cmake --build build --target install -j$(nproc || sysctl -n hw.ncpu)
33+
34+ - name : Remove unnecesary files
35+ run : |
36+ cd install/bin
37+ # remove all files except llvm-config
38+ for f in *; do
39+ if [ "$f" != "llvm-config" ]; then
40+ rm -f "$f"
41+ fi
42+ done
43+ cd ..
44+ rm -r share && rm -r lib/cmake
45+
46+ - name : Package
47+ run : |
48+ mv install llvm+lld-macos-aarch64
49+ tar -czf llvm+lld-macos-aarch64.tar.gz llvm+lld-macos-aarch64
50+
51+ - name : Upload Release
52+ uses : softprops/action-gh-release@v1
53+ with :
54+ files : llvm+lld-macos-aarch64.tar.gz
Original file line number Diff line number Diff line change 11# llvm-builds
2- Prebuilt versions of LLVM + LLD for platforms that Diamond supports
2+
3+ Prebuilt versions of LLVM + LLD for plataforms that Diamond supports.
You can’t perform that action at this time.
0 commit comments