Skip to content

Commit d0fed93

Browse files
committed
LLVM 18 support
1 parent 1d9f26c commit d0fed93

File tree

21 files changed

+86
-46
lines changed

21 files changed

+86
-46
lines changed

.circleci/config.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ commands:
1010
steps:
1111
- restore_cache:
1212
keys:
13-
- llvm-source-17-v1
13+
- llvm-source-18-v1
1414
- run:
1515
name: "Fetch LLVM source"
1616
command: make llvm-source
1717
- save_cache:
18-
key: llvm-source-17-v1
18+
key: llvm-source-18-v1
1919
paths:
2020
- llvm-project/clang/lib/Headers
2121
- llvm-project/clang/include
@@ -105,12 +105,12 @@ jobs:
105105
- test-linux:
106106
llvm: "15"
107107
resource_class: large
108-
test-llvm17-go122:
108+
test-llvm18-go122:
109109
docker:
110110
- image: golang:1.22-bullseye
111111
steps:
112112
- test-linux:
113-
llvm: "17"
113+
llvm: "18"
114114
resource_class: large
115115

116116
workflows:
@@ -119,5 +119,5 @@ workflows:
119119
# This tests our lowest supported versions of Go and LLVM, to make sure at
120120
# least the smoke tests still pass.
121121
- test-llvm15-go118
122-
# This tests LLVM 17 support when linking against system libraries.
123-
- test-llvm17-go122
122+
# This tests LLVM 18 support when linking against system libraries.
123+
- test-llvm18-go122

.github/workflows/build-macos.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
uses: actions/cache/restore@v4
4444
id: cache-llvm-source
4545
with:
46-
key: llvm-source-17-${{ matrix.os }}-v2
46+
key: llvm-source-18-${{ matrix.os }}-v2
4747
path: |
4848
llvm-project/clang/lib/Headers
4949
llvm-project/clang/include
@@ -68,7 +68,7 @@ jobs:
6868
uses: actions/cache/restore@v4
6969
id: cache-llvm-build
7070
with:
71-
key: llvm-build-17-${{ matrix.os }}-v2
71+
key: llvm-build-18-${{ matrix.os }}-v2
7272
path: llvm-build
7373
- name: Build LLVM
7474
if: steps.cache-llvm-build.outputs.cache-hit != 'true'
@@ -128,7 +128,7 @@ jobs:
128128
runs-on: macos-latest
129129
strategy:
130130
matrix:
131-
version: [16, 17]
131+
version: [16, 17, 18]
132132
steps:
133133
- name: Set up Homebrew
134134
uses: Homebrew/actions/setup-homebrew@master
@@ -152,8 +152,8 @@ jobs:
152152
- name: Check binary
153153
run: tinygo version
154154
- name: Build TinyGo (default LLVM)
155-
if: matrix.version == 17
155+
if: matrix.version == 18
156156
run: go install
157157
- name: Check binary
158-
if: matrix.version == 17
158+
if: matrix.version == 18
159159
run: tinygo version

.github/workflows/linux.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
uses: actions/cache/restore@v4
4444
id: cache-llvm-source
4545
with:
46-
key: llvm-source-17-linux-alpine-v2
46+
key: llvm-source-18-linux-alpine-v1
4747
path: |
4848
llvm-project/clang/lib/Headers
4949
llvm-project/clang/include
@@ -68,7 +68,7 @@ jobs:
6868
uses: actions/cache/restore@v4
6969
id: cache-llvm-build
7070
with:
71-
key: llvm-build-17-linux-alpine-v2
71+
key: llvm-build-18-linux-alpine-v1
7272
path: llvm-build
7373
- name: Build LLVM
7474
if: steps.cache-llvm-build.outputs.cache-hit != 'true'
@@ -196,7 +196,7 @@ jobs:
196196
uses: actions/cache/restore@v4
197197
id: cache-llvm-source
198198
with:
199-
key: llvm-source-17-linux-asserts-v2
199+
key: llvm-source-18-linux-asserts-v1
200200
path: |
201201
llvm-project/clang/lib/Headers
202202
llvm-project/clang/include
@@ -221,7 +221,7 @@ jobs:
221221
uses: actions/cache/restore@v4
222222
id: cache-llvm-build
223223
with:
224-
key: llvm-build-17-linux-asserts-v2
224+
key: llvm-build-18-linux-asserts-v1
225225
path: llvm-build
226226
- name: Build LLVM
227227
if: steps.cache-llvm-build.outputs.cache-hit != 'true'
@@ -309,7 +309,7 @@ jobs:
309309
uses: actions/cache/restore@v4
310310
id: cache-llvm-source
311311
with:
312-
key: llvm-source-17-linux-v2
312+
key: llvm-source-18-linux-v1
313313
path: |
314314
llvm-project/clang/lib/Headers
315315
llvm-project/clang/include
@@ -334,7 +334,7 @@ jobs:
334334
uses: actions/cache/restore@v4
335335
id: cache-llvm-build
336336
with:
337-
key: llvm-build-17-linux-${{ matrix.goarch }}-v2
337+
key: llvm-build-18-linux-${{ matrix.goarch }}-v1
338338
path: llvm-build
339339
- name: Build LLVM
340340
if: steps.cache-llvm-build.outputs.cache-hit != 'true'

.github/workflows/llvm.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ jobs:
3535
uses: docker/metadata-action@v5
3636
with:
3737
images: |
38-
tinygo/llvm-17
39-
ghcr.io/${{ github.repository_owner }}/llvm-17
38+
tinygo/llvm-18
39+
ghcr.io/${{ github.repository_owner }}/llvm-18
4040
tags: |
4141
type=sha,format=long
4242
type=raw,value=latest

.github/workflows/nix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
uses: actions/cache/restore@v4
2525
id: cache-llvm-source
2626
with:
27-
key: llvm-source-17-linux-nix-v2
27+
key: llvm-source-18-linux-nix-v1
2828
path: |
2929
llvm-project/compiler-rt
3030
- name: Download LLVM source

.github/workflows/sizediff-install-pkgs.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
# still works after checking out the dev branch (that is, when going from LLVM
33
# 16 to LLVM 17 for example, both Clang 16 and Clang 17 are installed).
44

5-
echo 'deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main' | sudo tee /etc/apt/sources.list.d/llvm.list
5+
echo 'deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main' | sudo tee /etc/apt/sources.list.d/llvm.list
66
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
77
sudo apt-get update
88
sudo apt-get install --no-install-recommends -y \
9-
llvm-17-dev \
10-
clang-17 \
11-
libclang-17-dev \
12-
lld-17
9+
llvm-18-dev \
10+
clang-18 \
11+
libclang-18-dev \
12+
lld-18

.github/workflows/sizediff.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
uses: actions/cache@v4
2929
id: cache-llvm-source
3030
with:
31-
key: llvm-source-17-sizediff-v2
31+
key: llvm-source-18-sizediff-v1
3232
path: |
3333
llvm-project/compiler-rt
3434
- name: Download LLVM source

.github/workflows/windows.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
uses: actions/cache/restore@v4
4242
id: cache-llvm-source
4343
with:
44-
key: llvm-source-17-windows-v2
44+
key: llvm-source-18-windows-v1
4545
path: |
4646
llvm-project/clang/lib/Headers
4747
llvm-project/clang/include
@@ -66,7 +66,7 @@ jobs:
6666
uses: actions/cache/restore@v4
6767
id: cache-llvm-build
6868
with:
69-
key: llvm-build-17-windows-v2
69+
key: llvm-build-18-windows-v1
7070
path: llvm-build
7171
- name: Build LLVM
7272
if: steps.cache-llvm-build.outputs.cache-hit != 'true'

GNUmakefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ LLD_SRC ?= $(LLVM_PROJECTDIR)/lld
1010

1111
# Try to autodetect LLVM build tools.
1212
# Versions are listed here in descending priority order.
13-
LLVM_VERSIONS = 17 16 15
13+
LLVM_VERSIONS = 18 17 16 15
1414
errifempty = $(if $(1),$(1),$(error $(2)))
1515
detect = $(shell which $(call errifempty,$(firstword $(foreach p,$(2),$(shell command -v $(p) 2> /dev/null && echo $(p)))),failed to locate $(1) at any of: $(2)))
1616
toolSearchPathsVersion = $(1)-$(2)
@@ -239,7 +239,7 @@ gen-device-renesas: build/gen-device-svd
239239

240240
# Get LLVM sources.
241241
$(LLVM_PROJECTDIR)/llvm:
242-
git clone -b esp-17.0.1_20240419 --depth=1 https://github.com/espressif/llvm-project $(LLVM_PROJECTDIR)
242+
git clone -b xtensa_release_18.1.2 --depth=1 https://github.com/espressif/llvm-project $(LLVM_PROJECTDIR)
243243
llvm-source: $(LLVM_PROJECTDIR)/llvm
244244

245245
# Configure LLVM.

builder/build.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ func Build(pkgName, outpath, tmpdir string, config *compileopts.Config) (BuildRe
773773
if sizeLevel >= 2 {
774774
// Workaround with roughly the same effect as
775775
// https://reviews.llvm.org/D119342.
776-
// Can hopefully be removed in LLVM 18.
776+
// Can hopefully be removed in LLVM 19.
777777
ldflags = append(ldflags,
778778
"-mllvm", "--rotation-max-header-size=0")
779779
}

0 commit comments

Comments
 (0)