From dad7221f36aac67b82517956532ebf5443e4ef2e Mon Sep 17 00:00:00 2001 From: Mikhail Rogachev Date: Fri, 27 Jan 2023 20:09:59 +0400 Subject: [PATCH] Hotfix: temporary restore cross compilation on Mac M1 (#3139) --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 6fcd6d5c4..ea029ff6a 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,12 @@ endif ifeq ($(detected_OS),Darwin) GOBIN_SHARED_LIB_EXT := dylib 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) GOBIN_SHARED_LIB_EXT := dll GOBIN_SHARED_LIB_CGO_LDFLAGS := CGO_LDFLAGS=""