From b0fdfdbbd09c76085eb0444f6adcdf83acf5749c Mon Sep 17 00:00:00 2001 From: Ivan FB Date: Mon, 30 Mar 2026 00:04:43 +0200 Subject: [PATCH] try to properly pass cpu in ci --- .github/workflows/ci.yml | 8 ++++---- config.nims | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) 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")