aboutsummaryrefslogtreecommitdiffhomepage
path: root/cgo
diff options
context:
space:
mode:
Diffstat (limited to 'cgo')
-rw-r--r--cgo/libclang_config.go1
-rw-r--r--cgo/libclang_config_llvm12.go14
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"