From c4bf4f8fffa10fed030db013e173dcb3b8ba24a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Wed, 4 Aug 2021 15:22:23 +0200 Subject: [PATCH] Apple M1: disable -march=native (#2759) --- config.nims | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config.nims b/config.nims index 9ca740380..2b99de452 100644 --- a/config.nims +++ b/config.nims @@ -46,7 +46,9 @@ if defined(windows): # and larger arithmetic use cases, along with register starvation issues. When # engineering a more portable binary release, this should be tweaked but still # use at least -msse2 or -msse3. -if defined(disableMarchNative): +# +# Apple's Clang can't handle "-march=native" on M1: https://github.com/status-im/nimbus-eth2/issues/2758 +if defined(disableMarchNative) or (defined(macosx) and defined(arm64)): if defined(i386) or defined(amd64): switch("passC", "-msse3") switch("passL", "-msse3")