Skip to content

Commit 46c19da

Browse files
committed
Initial commit
1 parent 16b41f4 commit 46c19da

File tree

2 files changed

+56
-1
lines changed

2 files changed

+56
-1
lines changed

.github/workflows/buid-llvm.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
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.

0 commit comments

Comments
 (0)