From 85a15a7254f28c81069dbbc51201e5025b5a74bc Mon Sep 17 00:00:00 2001 From: Denis Dmitriev Date: Thu, 23 Feb 2023 08:00:03 +0300 Subject: Add build tags to support both x86 and ARM compilation on macOS (#1069) * Add build tags to support both x86 and ARM compilation on macOS * Documentation fix: command line for build under macOS * Global replace 'macOS X' -> 'macOS'. Fix typo in -tags cmd line param * `README.md`: fix all `--tags` -> `-tags` --------- Co-authored-by: Denis Dmitriev --- sqlite3_libsqlite3.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sqlite3_libsqlite3.go') diff --git a/sqlite3_libsqlite3.go b/sqlite3_libsqlite3.go index e428fe6..ac609c9 100644 --- a/sqlite3_libsqlite3.go +++ b/sqlite3_libsqlite3.go @@ -10,8 +10,10 @@ package sqlite3 /* #cgo CFLAGS: -DUSE_LIBSQLITE3 #cgo linux LDFLAGS: -lsqlite3 -#cgo darwin LDFLAGS: -L/usr/local/opt/sqlite/lib -lsqlite3 -#cgo darwin CFLAGS: -I/usr/local/opt/sqlite/include +#cgo darwin,amd64 LDFLAGS: -L/usr/local/opt/sqlite/lib -lsqlite3 +#cgo darwin,amd64 CFLAGS: -I/usr/local/opt/sqlite/include +#cgo darwin,arm64 LDFLAGS: -L/opt/homebrew/opt/sqlite/lib -lsqlite3 +#cgo darwin,arm64 CFLAGS: -I/opt/homebrew/opt/sqlite/include #cgo openbsd LDFLAGS: -lsqlite3 #cgo solaris LDFLAGS: -lsqlite3 #cgo windows LDFLAGS: -lsqlite3 -- cgit v1.2.3