allow building shared library on M1 Macs
Seems like this wasn't supported in the past, but should work now. Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
1d9d7343c3
commit
4a4ae4c264
8
Makefile
8
Makefile
|
@ -17,14 +17,10 @@ endif
|
|||
|
||||
ifeq ($(detected_OS),Darwin)
|
||||
GOBIN_SHARED_LIB_EXT := dylib
|
||||
# Building on M1 is still not supported, so in the meantime we crosscompile by default to amd64
|
||||
ifeq ("$(shell sysctl -nq hw.optional.arm64)","1")
|
||||
FORCE_ARCH ?= amd64
|
||||
GOBIN_SHARED_LIB_CFLAGS=CGO_ENABLED=1 GOOS=darwin GOARCH=$(FORCE_ARCH)
|
||||
endif
|
||||
GOBIN_SHARED_LIB_CFLAGS := CGO_ENABLED=1 GOOS=darwin
|
||||
else ifeq ($(detected_OS),Windows)
|
||||
GOBIN_SHARED_LIB_CGO_LDFLAGS := CGO_LDFLAGS=""
|
||||
GOBIN_SHARED_LIB_EXT := dll
|
||||
GOBIN_SHARED_LIB_CGO_LDFLAGS := CGO_LDFLAGS=""
|
||||
else
|
||||
GOBIN_SHARED_LIB_EXT := so
|
||||
GOBIN_SHARED_LIB_CGO_LDFLAGS := CGO_LDFLAGS="-Wl,-soname,libstatus.so.0"
|
||||
|
|
Loading…
Reference in New Issue