Skip to content

Commit 0dfaa56

Browse files
committed
Simplify build configuration
- Use ubuntu-24.04 runner so we get a more recent clang version - Use native arm64 build, getting rid of zig - Remove setup steps for dependencies that are already installed on the runner images - Build using clang on Windows so we can use thinLTO there
1 parent 9070cb1 commit 0dfaa56

9 files changed

Lines changed: 14 additions & 47 deletions

File tree

‎.github/workflows/llvm.yml‎

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ env:
1818
LLVM_TARGETS: ${{ inputs.target }}
1919
LLVM_BINS: ${{ inputs.target }}
2020
LLVM_LIBS: ''
21-
ZIG_VERSION: '0.16.0'
2221
jobs:
2322
create-release:
2423
runs-on: ubuntu-latest
@@ -42,22 +41,22 @@ jobs:
4241
STATIC_LIB_SUFFIX: 'a'
4342
LLVM_TARGETS_TO_BUILD: 'AArch64'
4443
- os: linux-amd64
45-
runner: ubuntu-22.04
46-
toolchain: clang-lld-linux-amd64
44+
runner: ubuntu-24.04
45+
toolchain: clang-lld-linux
4746
BIN_SUFFIX: ''
4847
SO_SUFFIX: 'so.${{ inputs.version }}'
4948
STATIC_LIB_SUFFIX: 'a'
5049
LLVM_TARGETS_TO_BUILD: 'X86'
5150
- os: linux-arm64
52-
runner: ubuntu-22.04
53-
toolchain: zig-linux-arm64
51+
runner: ubuntu-24.04-arm
52+
toolchain: clang-lld-linux
5453
BIN_SUFFIX: ''
5554
SO_SUFFIX: 'so.${{ inputs.version }}'
5655
STATIC_LIB_SUFFIX: 'a'
5756
LLVM_TARGETS_TO_BUILD: 'AArch64'
5857
- os: windows-amd64
5958
runner: windows-latest
60-
toolchain: default
59+
toolchain: clang-lld-windows
6160
# Exclude directories with links, which Windows can't handle
6261
TAR_ARGS: '--exclude=*/clang/test/Driver/Inputs/* --exclude=*/libcxx/test/std/input.output/filesystems/Inputs/static_test_env/* --exclude=*/libclc/amdgcn-mesa3d --exclude=*/llvm/utils/mlgo-utils/*'
6362
BIN_SUFFIX: '.exe'
@@ -68,29 +67,10 @@ jobs:
6867
name: ${{ matrix.platform.os }}
6968
steps:
7069
- uses: actions/checkout@v7
71-
- name: Setup for macOS
72-
if: runner.os == 'macOS'
73-
run: |
74-
brew install cmake ninja
75-
- name: Setup for Linux
76-
if: runner.os == 'Linux'
77-
run: |
78-
sudo apt-get install -y cmake ninja-build
7970
- name: Setup for Windows
8071
if: runner.os == 'Windows'
8172
run: |
82-
choco install cmake ninja curl
83-
- name: Get zig toolchain
84-
if: startsWith(matrix.platform.toolchain, 'zig')
85-
shell: bash
86-
run: |
87-
echo "zig is $ZIG_VERSION"
88-
curl -L https://ziglang.org/download/${ZIG_VERSION}/zig-x86_64-linux-${ZIG_VERSION}.tar.xz -o zig.tar.xz
89-
90-
mkdir zig
91-
tar -C zig --strip-components=1 -xJf zig.tar.xz
92-
cd zig
93-
pwd >> $GITHUB_PATH
73+
choco install curl
9474
- name: Get llvm
9575
shell: bash
9676
run: |

‎build/llvm/clang-lld-windows.cmake‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Toolchain file to build LLVM using clang-cl and link using lld-link.
2+
#
3+
set(CMAKE_C_COMPILER clang-cl)
4+
set(CMAKE_CXX_COMPILER clang-cl)
5+
6+
# Tell LLVM's build system to link with lld (lld-link on Windows) instead of
7+
# the default MSVC linker. This is required for using thinLTO.
8+
set(LLVM_USE_LINKER lld CACHE STRING "" FORCE)

‎build/llvm/zig-linux-arm64.cmake‎

Lines changed: 0 additions & 14 deletions
This file was deleted.

‎build/zig-toolchain/ar‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎build/zig-toolchain/c++‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎build/zig-toolchain/cc‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎build/zig-toolchain/ranlib‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎build/zig-toolchain/zig-tool.sh‎

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)