try to properly pass cpu in ci

This commit is contained in:
Ivan FB 2026-03-30 00:04:43 +02:00
parent 2e4388136d
commit b0fdfdbbd0
No known key found for this signature in database
GPG Key ID: DF0C67A04C543270
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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")