Skip to content

Commit 63bb31a

Browse files
committed
main: add initial support for (in-development) LLVM 11
This can be useful to test improvements in LLVM master and to make it possible to support LLVM 11 for the most part already before the next release. That also allows catching LLVM bugs early to fix them upstream. Note that tests do not yet pass for this LLVM version, but the TinyGo compiler can be built with the binaries from apt.llvm.org (at the time of making this commit).
1 parent d61d5d7 commit 63bb31a

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed

cgo/libclang_config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// +build !byollvm
2-
// +build !llvm9
2+
// +build !llvm9,!llvm11
33

44
package cgo
55

cgo/libclang_config_llvm11.go

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

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ require (
1111
go.bug.st/serial v1.0.0
1212
golang.org/x/tools v0.0.0-20200216192241-b320d3a0f5a2
1313
google.golang.org/appengine v1.4.0 // indirect
14-
tinygo.org/x/go-llvm v0.0.0-20200503225853-345b2947b59d
14+
tinygo.org/x/go-llvm v0.0.0-20200503224449-70c558526021
1515
)

go.sum

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,8 @@ tinygo.org/x/go-llvm v0.0.0-20200226165415-53522ab6713d h1:mtgZh/e8a3wxneQFuLXoQ
7474
tinygo.org/x/go-llvm v0.0.0-20200226165415-53522ab6713d/go.mod h1:fv1F0BSNpxMfCL0zF3M4OPFbgYHnhtB6ST0HvUtu/LE=
7575
tinygo.org/x/go-llvm v0.0.0-20200401165421-8d120882fc7a h1:Ugje2Lxuv8CFncHzs5W+hWfJvPsM+W4K0zRvzFbLvoE=
7676
tinygo.org/x/go-llvm v0.0.0-20200401165421-8d120882fc7a/go.mod h1:fv1F0BSNpxMfCL0zF3M4OPFbgYHnhtB6ST0HvUtu/LE=
77-
tinygo.org/x/go-llvm v0.0.0-20200503225853-345b2947b59d h1:hcX7vpB067GWM/EH4sGGOti0PMgIx+0bbZwUXctOIvE=
77+
tinygo.org/x/go-llvm v0.0.0-20200503224449-70c558526021 h1:d8T98WXGjrTgDmMXgxa6nb9EAYXGXwnzXygnJl6d+ac=
78+
tinygo.org/x/go-llvm v0.0.0-20200503224449-70c558526021/go.mod h1:fv1F0BSNpxMfCL0zF3M4OPFbgYHnhtB6ST0HvUtu/LE=
79+
tinygo.org/x/go-llvm v0.0.0-20200503224713-7423bdafa2f9 h1:KFfF504tThsZPhscpC9W1INMVce1MLv/pIVcT4R9vZE=
80+
tinygo.org/x/go-llvm v0.0.0-20200503224713-7423bdafa2f9/go.mod h1:fv1F0BSNpxMfCL0zF3M4OPFbgYHnhtB6ST0HvUtu/LE=
7881
tinygo.org/x/go-llvm v0.0.0-20200503225853-345b2947b59d/go.mod h1:fv1F0BSNpxMfCL0zF3M4OPFbgYHnhtB6ST0HvUtu/LE=

0 commit comments

Comments
 (0)