diff options
author | Ayke van Laethem <[email protected]> | 2023-09-23 15:03:24 +0200 |
---|---|---|
committer | Ron Evans <[email protected]> | 2023-10-06 09:05:07 +0200 |
commit | 18b50db0dc443caf90a1a8ace323c39babcd5fec (patch) | |
tree | d467e70e6552ebb9abf97b0ea1a0fd2c545a85a3 /cgo | |
parent | 499fce9cee745159c78adf1df5527f3c003972e5 (diff) | |
download | tinygo-18b50db0dc443caf90a1a8ace323c39babcd5fec.tar.gz tinygo-18b50db0dc443caf90a1a8ace323c39babcd5fec.zip |
all: add initial LLVM 17 support
This allows us to test and use LLVM 17, now that it is available in
Homebrew.
Full support for LLVM 17 (including using it by default) will have to
wait until Espressif rebases their Xtensa fork of LLVM.
Diffstat (limited to 'cgo')
-rw-r--r-- | cgo/libclang_config_llvm16.go | 4 | ||||
-rw-r--r-- | cgo/libclang_config_llvm17.go | 15 |
2 files changed, 17 insertions, 2 deletions
diff --git a/cgo/libclang_config_llvm16.go b/cgo/libclang_config_llvm16.go index 01c3a7e2d..8afdb14cb 100644 --- a/cgo/libclang_config_llvm16.go +++ b/cgo/libclang_config_llvm16.go @@ -1,8 +1,8 @@ -//go:build !byollvm && !llvm15 +//go:build !byollvm && !llvm15 && !llvm17 package cgo -// As of 2023-05-05, there is a packaging issue on Debian: +// As of 2023-05-05, there is a packaging issue with LLVM 16 on Debian: // https://github.com/llvm/llvm-project/issues/62199 // A workaround is to fix this locally, using something like this: // diff --git a/cgo/libclang_config_llvm17.go b/cgo/libclang_config_llvm17.go new file mode 100644 index 000000000..fd6d1480e --- /dev/null +++ b/cgo/libclang_config_llvm17.go @@ -0,0 +1,15 @@ +//go:build !byollvm && llvm17 + +package cgo + +/* +#cgo linux CFLAGS: -I/usr/include/llvm-17 -I/usr/include/llvm-c-17 -I/usr/lib/llvm-17/include +#cgo darwin,amd64 CFLAGS: -I/usr/local/opt/llvm@17/include +#cgo darwin,arm64 CFLAGS: -I/opt/homebrew/opt/llvm@17/include +#cgo freebsd CFLAGS: -I/usr/local/llvm17/include +#cgo linux LDFLAGS: -L/usr/lib/llvm-17/lib -lclang +#cgo darwin,amd64 LDFLAGS: -L/usr/local/opt/llvm@17/lib -lclang -lffi +#cgo darwin,arm64 LDFLAGS: -L/opt/homebrew/opt/llvm@17/lib -lclang -lffi +#cgo freebsd LDFLAGS: -L/usr/local/llvm17/lib -lclang +*/ +import "C" |