diff options
author | Pure White <[email protected]> | 2022-01-12 19:10:08 +0800 |
---|---|---|
committer | GitHub <[email protected]> | 2022-01-12 12:10:08 +0100 |
commit | 93e0636c039deb6fc3f489851d4a8ef4db3ea89e (patch) | |
tree | 1e0b21810b9efdb84b10795dcc21fbbef9ec04d4 /cgo | |
parent | ef77b645b927bcf4c049363c2e88a9f5c16446dd (diff) | |
download | tinygo-93e0636c039deb6fc3f489851d4a8ef4db3ea89e.tar.gz tinygo-93e0636c039deb6fc3f489851d4a8ef4db3ea89e.zip |
feat: support build on darwin arm64 (#2439)
main: support build on darwin arm64
Diffstat (limited to 'cgo')
-rw-r--r-- | cgo/libclang_config.go | 14 | ||||
-rw-r--r-- | cgo/libclang_config_llvm12.go | 18 | ||||
-rw-r--r-- | cgo/libclang_config_llvm13.go | 14 |
3 files changed, 26 insertions, 20 deletions
diff --git a/cgo/libclang_config.go b/cgo/libclang_config.go index ed929f79b..14a065aab 100644 --- a/cgo/libclang_config.go +++ b/cgo/libclang_config.go @@ -4,11 +4,13 @@ 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 +#cgo linux CFLAGS: -I/usr/lib/llvm-11/include +#cgo darwin amd64 CFLAGS: -I/usr/local/opt/llvm@11/include +#cgo darwin arm64 CFLAGS: -I/opt/homebrew/opt/llvm@11/include +#cgo freebsd CFLAGS: -I/usr/local/llvm11/include +#cgo linux LDFLAGS: -L/usr/lib/llvm-11/lib -lclang +#cgo darwin amd64 LDFLAGS: -L/usr/local/opt/llvm@11/lib -lclang -lffi +#cgo darwin arm64 LDFLAGS: -L/opt/homebrew/opt/llvm@11/lib -lclang -lffi +#cgo freebsd LDFLAGS: -L/usr/local/llvm11/lib -lclang */ import "C" diff --git a/cgo/libclang_config_llvm12.go b/cgo/libclang_config_llvm12.go index 1837cc154..69808d2ea 100644 --- a/cgo/libclang_config_llvm12.go +++ b/cgo/libclang_config_llvm12.go @@ -1,14 +1,16 @@ -// +build !byollvm -// +build llvm12 +//go:build !byollvm && llvm12 +// +build !byollvm,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 +#cgo linux CFLAGS: -I/usr/lib/llvm-12/include +#cgo darwin amd64 CFLAGS: -I/usr/local/opt/llvm@12/include +#cgo darwin arm64 CFLAGS: -I/opt/homebrew/opt/llvm@12/include +#cgo freebsd CFLAGS: -I/usr/local/llvm12/include +#cgo linux LDFLAGS: -L/usr/lib/llvm-12/lib -lclang +#cgo darwin amd64 LDFLAGS: -L/usr/local/opt/llvm@12/lib -lclang -lffi +#cgo darwin arm64 LDFLAGS: -L/opt/homebrew/opt/llvm@12/lib -lclang -lffi +#cgo freebsd LDFLAGS: -L/usr/local/llvm12/lib -lclang */ import "C" diff --git a/cgo/libclang_config_llvm13.go b/cgo/libclang_config_llvm13.go index 3c961a3fd..81c11e670 100644 --- a/cgo/libclang_config_llvm13.go +++ b/cgo/libclang_config_llvm13.go @@ -4,11 +4,13 @@ package cgo /* -#cgo linux CFLAGS: -I/usr/lib/llvm-13/include -#cgo darwin CFLAGS: -I/usr/local/opt/llvm@13/include -#cgo freebsd CFLAGS: -I/usr/local/llvm13/include -#cgo linux LDFLAGS: -L/usr/lib/llvm-13/lib -lclang -#cgo darwin LDFLAGS: -L/usr/local/opt/llvm@13/lib -lclang -lffi -#cgo freebsd LDFLAGS: -L/usr/local/llvm13/lib -lclang +#cgo linux CFLAGS: -I/usr/lib/llvm-13/include +#cgo darwin amd64 CFLAGS: -I/usr/local/opt/llvm@13/include +#cgo darwin arm64 CFLAGS: -I/opt/homebrew/opt/llvm@13/include +#cgo freebsd CFLAGS: -I/usr/local/llvm13/include +#cgo linux LDFLAGS: -L/usr/lib/llvm-13/lib -lclang +#cgo darwin amd64 LDFLAGS: -L/usr/local/opt/llvm@13/lib -lclang -lffi +#cgo darwin arm64 LDFLAGS: -L/opt/homebrew/opt/llvm@13/lib -lclang -lffi +#cgo freebsd LDFLAGS: -L/usr/local/llvm13/lib -lclang */ import "C" |