diff options
author | Ayke van Laethem <[email protected]> | 2021-03-28 19:56:03 -0400 |
---|---|---|
committer | Ron Evans <[email protected]> | 2021-11-30 21:53:16 +0100 |
commit | 5127b9d65b132547d5b4c1a60a8be381871d8ac8 (patch) | |
tree | 669de102bb57f0e897514dde11d7c67fad0163b7 /cgo | |
parent | 74b20ca234d901b5f9d4c202321a611ca60ee6a7 (diff) | |
download | tinygo-5127b9d65b132547d5b4c1a60a8be381871d8ac8.tar.gz tinygo-5127b9d65b132547d5b4c1a60a8be381871d8ac8.zip |
all: add LLVM 12 support
Originally based on a PR by @QuLogic, but extended a lot to get all
tests to pass.
Diffstat (limited to 'cgo')
-rw-r--r-- | cgo/libclang_config.go | 1 | ||||
-rw-r--r-- | cgo/libclang_config_llvm12.go | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/cgo/libclang_config.go b/cgo/libclang_config.go index 4b4ce2dbf..9f7cdc1cb 100644 --- a/cgo/libclang_config.go +++ b/cgo/libclang_config.go @@ -1,4 +1,5 @@ // +build !byollvm +// +build !llvm12 package cgo diff --git a/cgo/libclang_config_llvm12.go b/cgo/libclang_config_llvm12.go new file mode 100644 index 000000000..1837cc154 --- /dev/null +++ b/cgo/libclang_config_llvm12.go @@ -0,0 +1,14 @@ +// +build !byollvm +// +build llvm12 + +package cgo + +/* +#cgo linux CFLAGS: -I/usr/lib/llvm-12/include +#cgo darwin CFLAGS: -I/usr/local/opt/llvm@12/include +#cgo freebsd CFLAGS: -I/usr/local/llvm12/include +#cgo linux LDFLAGS: -L/usr/lib/llvm-12/lib -lclang +#cgo darwin LDFLAGS: -L/usr/local/opt/llvm@12/lib -lclang -lffi +#cgo freebsd LDFLAGS: -L/usr/local/llvm12/lib -lclang +*/ +import "C" |