Hotfix: temporary restore cross compilation on Mac M1 (#3139)

This commit is contained in:
Mikhail Rogachev 2023-01-27 20:09:59 +04:00 committed by GitHub
parent 90b39eeb41
commit dad7221f36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -18,6 +18,12 @@ endif
ifeq ($(detected_OS),Darwin) ifeq ($(detected_OS),Darwin)
GOBIN_SHARED_LIB_EXT := dylib GOBIN_SHARED_LIB_EXT := dylib
GOBIN_SHARED_LIB_CFLAGS := CGO_ENABLED=1 GOOS=darwin GOBIN_SHARED_LIB_CFLAGS := CGO_ENABLED=1 GOOS=darwin
# Qt14.x doesn't provides arm64 binaries on apple silicon
# See https://github.com/status-im/status-go/pull/3131#issuecomment-1406303234
ifeq ("$(shell sysctl -nq hw.optional.arm64)","1")
FORCE_ARCH ?= amd64
GOBIN_SHARED_LIB_CFLAGS=CGO_ENABLED=1 GOOS=darwin GOARCH=$(FORCE_ARCH)
endif
else ifeq ($(detected_OS),Windows) else ifeq ($(detected_OS),Windows)
GOBIN_SHARED_LIB_EXT := dll GOBIN_SHARED_LIB_EXT := dll
GOBIN_SHARED_LIB_CGO_LDFLAGS := CGO_LDFLAGS="" GOBIN_SHARED_LIB_CGO_LDFLAGS := CGO_LDFLAGS=""