Skip to content

Commit

Permalink
Fix llvm build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
npaun committed Dec 16, 2024
1 parent e7f2fe6 commit 0f095ed
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/llvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:
LLVM_TARGETS: 'clang-format'
LLVM_BINS: 'clang-format'
LLVM_LIBS: ''
ZIG_VERSION: '0.14.0-dev.1651+ffd071f55'
ZIG_VERSION: '0.14.0-dev.2487+af89bb05d'
jobs:
create-release:
runs-on: ubuntu-latest
Expand All @@ -36,21 +36,21 @@ jobs:
BIN_SUFFIX: ''
SO_SUFFIX: '${{ inputs.version }}.dylib'
STATIC_LIB_SUFFIX: 'a'
LLVM_TARGETS_TO_BUILD: 'ARM'
LLVM_TARGETS_TO_BUILD: 'AArch64'
- os: linux-amd64
runner: ubuntu-latest
runner: ubuntu-22.04
toolchain: default
BIN_SUFFIX: ''
SO_SUFFIX: 'so.${{ inputs.version }}'
STATIC_LIB_SUFFIX: 'a'
LLVM_TARGETS_TO_BUILD: 'X86'
- os: linux-arm64
runner: ubuntu-latest
runner: ubuntu-22.04
toolchain: zig-linux-arm64
BIN_SUFFIX: ''
SO_SUFFIX: 'so.${{ inputs.version }}'
STATIC_LIB_SUFFIX: 'a'
LLVM_TARGETS_TO_BUILD: 'ARM'
LLVM_TARGETS_TO_BUILD: 'AArch64'
- os: windows-amd64
runner: windows-latest
toolchain: default
Expand All @@ -77,8 +77,10 @@ jobs:
choco install cmake ninja curl
- name: Get zig toolchain
if: startsWith(matrix.platform.toolchain, 'zig')
shell: bash
run: |
curl -L https://ziglang.org/builds/zig-linux-x86_64-$ZIG_VERSION.tar.xz -o zig.tar.xz
echo "zig is $ZIG_VERSION"
curl -L https://ziglang.org/builds/zig-linux-x86_64-${ZIG_VERSION}.tar.xz -o zig.tar.xz
mkdir zig
tar -C zig --strip-components=1 -xJf zig.tar.xz
cd zig
Expand All @@ -93,15 +95,12 @@ jobs:
shell: bash
run: |
cd llvm
cmake -B build llvm -GNinja \
-DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/build/llvm/${{ matrix.platform.toolchain }}.cmake \
$(cat $GITHUB_WORKSPACE/build/llvm/common.args) \
-DLLVM_TARGETS_TO_BUILD=${{ matrix.platform.LLVM_TARGETS_TO_BUILD }}
cmake -B build llvm -GNinja -DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/build/llvm/${{ matrix.platform.toolchain }}.cmake $(cat $GITHUB_WORKSPACE/build/llvm/common.args) -DLLVM_TARGETS_TO_BUILD=${{ matrix.platform.LLVM_TARGETS_TO_BUILD }}
- name: Build targets
shell: bash
run: |
cd llvm/build
ninja $LLVM_TARGETS
ninja $LLVM_TARGETS # Ninja automatically builds in parallel
- name: Upload products
shell: bash
run: |
Expand Down
13 changes: 12 additions & 1 deletion build/llvm/common.args
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,15 @@
-DBUILD_SHARED_LIBS=OFF
-DLLDB_ENABLE_PYTHON=0
-DLLDB_INCLUDE_TESTS=0

-DLLVM_INCLUDE_BENCHMARKS=OFF
-DLLVM_INCLUDE_EXAMPLES=OFF
-DLLVM_INCLUDE_RUNTIMES=OFF
-DLLVM_INCLUDE_TESTS=OFF
-DLLVM_INCLUDE_UTILS=OFF
-DLLVM_ENABLE_IDE=ON
-DLLVM_ENABLE_PLUGINS=OFF
-DCLANG_ENABLE_ARCMT=OFF
-DCLANG_ENABLE_STATIC_ANALYZER=OFF
-DCLANG_PLUGIN_SUPPORT=OFF
-DCMAKE_CXX_FLAGS=-g0
-DCMAKE_C_FLAGS=-g0

0 comments on commit 0f095ed

Please sign in to comment.