Skip to content

Commit 424ee98

Browse files
committedJun 9, 2020
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 8c2fee2 commit 424ee98

File tree

4 files changed

+19
-2
lines changed

4 files changed

+19
-2
lines changed
 

‎cgo/libclang_config.go

+1-1
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

+14
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ require (
99
go.bug.st/serial v1.0.0
1010
golang.org/x/tools v0.0.0-20200216192241-b320d3a0f5a2
1111
google.golang.org/appengine v1.4.0 // indirect
12-
tinygo.org/x/go-llvm v0.0.0-20200503224713-7423bdafa2f9
12+
tinygo.org/x/go-llvm v0.0.0-20200503224449-70c558526021
1313
)

‎go.sum

+3
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,8 @@ tinygo.org/x/go-llvm v0.0.0-20200226165415-53522ab6713d h1:mtgZh/e8a3wxneQFuLXoQ
5757
tinygo.org/x/go-llvm v0.0.0-20200226165415-53522ab6713d/go.mod h1:fv1F0BSNpxMfCL0zF3M4OPFbgYHnhtB6ST0HvUtu/LE=
5858
tinygo.org/x/go-llvm v0.0.0-20200401165421-8d120882fc7a h1:Ugje2Lxuv8CFncHzs5W+hWfJvPsM+W4K0zRvzFbLvoE=
5959
tinygo.org/x/go-llvm v0.0.0-20200401165421-8d120882fc7a/go.mod h1:fv1F0BSNpxMfCL0zF3M4OPFbgYHnhtB6ST0HvUtu/LE=
60+
tinygo.org/x/go-llvm v0.0.0-20200503224449-70c558526021 h1:d8T98WXGjrTgDmMXgxa6nb9EAYXGXwnzXygnJl6d+ac=
61+
tinygo.org/x/go-llvm v0.0.0-20200503224449-70c558526021/go.mod h1:fv1F0BSNpxMfCL0zF3M4OPFbgYHnhtB6ST0HvUtu/LE=
6062
tinygo.org/x/go-llvm v0.0.0-20200503224713-7423bdafa2f9 h1:KFfF504tThsZPhscpC9W1INMVce1MLv/pIVcT4R9vZE=
6163
tinygo.org/x/go-llvm v0.0.0-20200503224713-7423bdafa2f9/go.mod h1:fv1F0BSNpxMfCL0zF3M4OPFbgYHnhtB6ST0HvUtu/LE=
64+
tinygo.org/x/go-llvm v0.0.0-20200503225853-345b2947b59d/go.mod h1:fv1F0BSNpxMfCL0zF3M4OPFbgYHnhtB6ST0HvUtu/LE=

0 commit comments

Comments
 (0)