aboutsummaryrefslogtreecommitdiffhomepage
path: root/cgo/libclang_config_llvm11.go
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2020-04-14 22:43:32 +0200
committerAyke van Laethem <[email protected]>2020-06-27 01:19:21 +0200
commitf7f20829795281f9c7dbdd1ae16c170e594df819 (patch)
tree655f1ef1d51e2d3c14ee7b37df7cf60f4b7bbd33 /cgo/libclang_config_llvm11.go
parent9b1a19f184b7dbdff2ee2eb82b58bbc11aec1239 (diff)
downloadtinygo-f7f20829795281f9c7dbdd1ae16c170e594df819.tar.gz
tinygo-f7f20829795281f9c7dbdd1ae16c170e594df819.zip
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).
Diffstat (limited to 'cgo/libclang_config_llvm11.go')
-rw-r--r--cgo/libclang_config_llvm11.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/cgo/libclang_config_llvm11.go b/cgo/libclang_config_llvm11.go
new file mode 100644
index 000000000..6fab82bef
--- /dev/null
+++ b/cgo/libclang_config_llvm11.go
@@ -0,0 +1,14 @@
+// +build !byollvm
+// +build llvm11
+
+package cgo
+
+/*
+#cgo linux CFLAGS: -I/usr/lib/llvm-11/include
+#cgo darwin CFLAGS: -I/usr/local/opt/llvm@11/include
+#cgo freebsd CFLAGS: -I/usr/local/llvm11/include
+#cgo linux LDFLAGS: -L/usr/lib/llvm-11/lib -lclang
+#cgo darwin LDFLAGS: -L/usr/local/opt/llvm@11/lib -lclang -lffi
+#cgo freebsd LDFLAGS: -L/usr/local/llvm11/lib -lclang
+*/
+import "C"