Skip to content

Commit 870c36a

Browse files
committed
ci: add support for LLVM 15
Also switch to LLVM 15 for builds with a system-installed LLVM.
1 parent 63f0072 commit 870c36a

File tree

6 files changed

+28
-12
lines changed

6 files changed

+28
-12
lines changed

.circleci/config.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,12 @@ jobs:
118118
steps:
119119
- test-linux:
120120
llvm: "14"
121-
test-llvm14-go119:
121+
test-llvm15-go119:
122122
docker:
123-
- image: golang:1.19beta1-buster
123+
- image: golang:1.19-buster
124124
steps:
125125
- test-linux:
126-
llvm: "14"
126+
llvm: "15"
127127
fmt-check: false
128128

129129
workflows:
@@ -132,6 +132,6 @@ workflows:
132132
# This tests our lowest supported versions of Go and LLVM, to make sure at
133133
# least the smoke tests still pass.
134134
- test-llvm14-go118
135-
# This tests a beta version of Go. It should be removed once regular
136-
# release builds are built using this version.
137-
- test-llvm14-go119
135+
# This tests a newer version of Go and LLVM. It should be removed once
136+
# regular release builds are built using these versions.
137+
- test-llvm15-go119

.github/workflows/build-macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ jobs:
108108
- name: Install LLVM
109109
shell: bash
110110
run: |
111-
HOMEBREW_NO_AUTO_UPDATE=1 brew install llvm@14
111+
HOMEBREW_NO_AUTO_UPDATE=1 brew install llvm@15
112112
- name: Checkout
113113
uses: actions/checkout@v2
114114
- name: Install Go

cgo/libclang_config_llvm14.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
//go:build !byollvm
2-
// +build !byollvm
1+
//go:build !byollvm && llvm14
2+
// +build !byollvm,llvm14
33

44
package cgo
55

cgo/libclang_config_llvm15.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//go:build !byollvm && !llvm14
2+
// +build !byollvm,!llvm14
3+
4+
package cgo
5+
6+
/*
7+
#cgo linux CFLAGS: -I/usr/lib/llvm-15/include
8+
#cgo darwin,amd64 CFLAGS: -I/usr/local/opt/llvm@15/include
9+
#cgo darwin,arm64 CFLAGS: -I/opt/homebrew/opt/llvm@15/include
10+
#cgo freebsd CFLAGS: -I/usr/local/llvm15/include
11+
#cgo linux LDFLAGS: -L/usr/lib/llvm-15/lib -lclang
12+
#cgo darwin,amd64 LDFLAGS: -L/usr/local/opt/llvm@15/lib -lclang -lffi
13+
#cgo darwin,arm64 LDFLAGS: -L/opt/homebrew/opt/llvm@15/lib -lclang -lffi
14+
#cgo freebsd LDFLAGS: -L/usr/local/llvm15/lib -lclang
15+
*/
16+
import "C"

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ require (
1717
golang.org/x/sys v0.0.0-20220829200755-d48e67d00261
1818
golang.org/x/tools v0.1.11
1919
gopkg.in/yaml.v2 v2.4.0
20-
tinygo.org/x/go-llvm v0.0.0-20220922113433-4b5ad7ff76ec
20+
tinygo.org/x/go-llvm v0.0.0-20220922115213-dcb078a26266
2121
)
2222

2323
require (

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,5 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8
6464
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
6565
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
6666
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
67-
tinygo.org/x/go-llvm v0.0.0-20220922113433-4b5ad7ff76ec h1:FYtAFrw/YQPc644uNN65dW50FrEuVNaPBf70x23ApY4=
68-
tinygo.org/x/go-llvm v0.0.0-20220922113433-4b5ad7ff76ec/go.mod h1:GFbusT2VTA4I+l4j80b17KFK+6whv69Wtny5U+T8RR0=
67+
tinygo.org/x/go-llvm v0.0.0-20220922115213-dcb078a26266 h1:vg4sYKEM+w6epr5S1nXqP/7UhMYcc8nRt7Ohkq28rok=
68+
tinygo.org/x/go-llvm v0.0.0-20220922115213-dcb078a26266/go.mod h1:GFbusT2VTA4I+l4j80b17KFK+6whv69Wtny5U+T8RR0=

0 commit comments

Comments
 (0)