Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2b908c3

Browse files
committedApr 14, 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 efdb2e8 commit 2b908c3

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-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-20200401165421-8d120882fc7a
12+
tinygo.org/x/go-llvm v0.0.0-20200414203954-86906e8f71ef
1313
)

‎go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,5 @@ 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-20200414203954-86906e8f71ef h1:vs8yU63lRneX+UlYM9nhKNmDNdf87TS1dBFJBT1SPUk=
61+
tinygo.org/x/go-llvm v0.0.0-20200414203954-86906e8f71ef/go.mod h1:fv1F0BSNpxMfCL0zF3M4OPFbgYHnhtB6ST0HvUtu/LE=

0 commit comments

Comments
 (0)
Please sign in to comment.