enable build on Mac M1

- On Mac, -march=native is only supported in newest Clang versions,
better disable it for now.

- Bumping Leopard version to one that support arm64

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
Csaba Kiraly 2022-05-17 16:27:59 +02:00 committed by Csaba Kiraly
parent 15a571387f
commit aec9a6eb92
2 changed files with 8 additions and 2 deletions

View File

@ -25,8 +25,14 @@ 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):
switch("passC", "-msse3")
if defined(i386) or defined(amd64):
switch("passC", "-mssse3")
elif defined(macosx) and defined(arm64):
# Apple's Clang can't handle "-march=native" on M1: https://github.com/status-im/nimbus-eth2/issues/2758
switch("passC", "-mcpu=apple-a14")
# TODO: newer Clang >=15.0 can: https://github.com/llvm/llvm-project/commit/fcca10c69aaab539962d10fcc59a5f074b73b0de
else:
switch("passC", "-march=native")
if defined(windows):

2
vendor/nim-leopard vendored

@ -1 +1 @@
Subproject commit 41cd86df5bfa67afe7d3660e8ab0878133c8600e
Subproject commit 2a6a63923e9b95676b5ae7ff2c346be0e63e753c