aboutsummaryrefslogtreecommitdiffhomepage
path: root/cgo
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2021-01-16 19:04:23 +0100
committerRon Evans <[email protected]>2021-01-19 08:55:57 +0100
commita90865506d75827ff295f2ae7f74671ca91aa78e (patch)
treef72e1e93dece31578588a0b28afa9899d61e2f27 /cgo
parenta867b56e5f9e6778f48a33d75b6543b0ca92dcc1 (diff)
downloadtinygo-a90865506d75827ff295f2ae7f74671ca91aa78e.tar.gz
tinygo-a90865506d75827ff295f2ae7f74671ca91aa78e.zip
main: use LLVM 11 by default when linking LLVM dynamically
This doesn't affect the release builds but it is helpful for TinyGo developers.
Diffstat (limited to 'cgo')
-rw-r--r--cgo/libclang_config.go14
-rw-r--r--cgo/libclang_config_llvm10.go14
-rw-r--r--cgo/libclang_config_llvm11.go14
3 files changed, 21 insertions, 21 deletions
diff --git a/cgo/libclang_config.go b/cgo/libclang_config.go
index 24b950143..4a5d0603e 100644
--- a/cgo/libclang_config.go
+++ b/cgo/libclang_config.go
@@ -1,14 +1,14 @@
// +build !byollvm
-// +build !llvm9,!llvm11
+// +build !llvm10,!llvm9
package cgo
/*
-#cgo linux CFLAGS: -I/usr/lib/llvm-10/include
-#cgo darwin CFLAGS: -I/usr/local/opt/llvm@10/include
-#cgo freebsd CFLAGS: -I/usr/local/llvm10/include
-#cgo linux LDFLAGS: -L/usr/lib/llvm-10/lib -lclang
-#cgo darwin LDFLAGS: -L/usr/local/opt/llvm@10/lib -lclang -lffi
-#cgo freebsd LDFLAGS: -L/usr/local/llvm10/lib -lclang
+#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"
diff --git a/cgo/libclang_config_llvm10.go b/cgo/libclang_config_llvm10.go
new file mode 100644
index 000000000..9b9939495
--- /dev/null
+++ b/cgo/libclang_config_llvm10.go
@@ -0,0 +1,14 @@
+// +build !byollvm
+// +build llvm10
+
+package cgo
+
+/*
+#cgo linux CFLAGS: -I/usr/lib/llvm-10/include
+#cgo darwin CFLAGS: -I/usr/local/opt/llvm@10/include
+#cgo freebsd CFLAGS: -I/usr/local/llvm10/include
+#cgo linux LDFLAGS: -L/usr/lib/llvm-10/lib -lclang
+#cgo darwin LDFLAGS: -L/usr/local/opt/llvm@10/lib -lclang -lffi
+#cgo freebsd LDFLAGS: -L/usr/local/llvm10/lib -lclang
+*/
+import "C"
diff --git a/cgo/libclang_config_llvm11.go b/cgo/libclang_config_llvm11.go
deleted file mode 100644
index 6fab82bef..000000000
--- a/cgo/libclang_config_llvm11.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// +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"