diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f84b3a420..560073899 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -188,8 +188,8 @@ jobs: NIM_PARAMS="" if [[ '${{ runner.os }}' == 'macOS' ]]; then case "$(uname -m)" in - x86_64) NIM_PARAMS="--cpu:amd64" ;; - arm64) NIM_PARAMS="--cpu:arm64" ;; + x86_64) NIM_PARAMS="--cpu:amd64 -d:disableMarchNative" ;; + arm64) NIM_PARAMS="--cpu:arm64 -d:disableMarchNative" ;; esac fi make V=1 QUICK_AND_DIRTY_COMPILER=1 NIM_PARAMS="${NIM_PARAMS}" USE_LIBBACKTRACE=0 all @@ -345,8 +345,8 @@ jobs: NIM_PARAMS="" if [[ '${{ runner.os }}' == 'macOS' ]]; then case "$(uname -m)" in - x86_64) NIM_PARAMS="--cpu:amd64" ;; - arm64) NIM_PARAMS="--cpu:arm64" ;; + x86_64) NIM_PARAMS="--cpu:amd64 -d:disableMarchNative" ;; + arm64) NIM_PARAMS="--cpu:arm64 -d:disableMarchNative" ;; esac fi diff --git a/config.nims b/config.nims index 8e50cfecf..9bc305a4e 100644 --- a/config.nims +++ b/config.nims @@ -54,7 +54,7 @@ if defined(disableMarchNative): elif defined(macosx) and defined(amd64): switch("passC", "-march=native") switch("passL", "-march=native") -elif defined(macosx) and defined(arm64): +elif defined(macosx) and defined(arm64) and not defined(disableMarchNative): # Apple's Clang can't handle "-march=native" on M1: https://github.com/status-im/nimbus-eth2/issues/2758 switch("passC", "-mcpu=apple-m1") switch("passL", "-mcpu=apple-m1")