@@ -24,17 +24,25 @@ if defined(windows):
2424# engineering a more portable binary release, this should be tweaked but still
2525# use at least -msse2 or -msse3.
2626if defined (disableMarchNative):
27- switch (" passC" , " -msse3" )
27+ if defined (i386) or defined (amd64):
28+ if defined (macosx):
29+ switch (" passC" , " -march=haswell -mtune=generic" )
30+ switch (" passL" , " -march=haswell -mtune=generic" )
31+ else :
32+ switch (" passC" , " -msse3" )
33+ switch (" passL" , " -msse3" )
2834elif defined (macosx) and defined (arm64):
2935 # Apple's Clang can't handle "-march=native" on M1: https://github.com/status-im/nimbus-eth2/issues/2758
3036 switch (" passC" , " -mcpu=apple-m1" )
3137 switch (" passL" , " -mcpu=apple-m1" )
3238else :
3339 switch (" passC" , " -march=native" )
40+ switch (" passL" , " -march=native" )
3441 if defined (windows):
3542 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65782
3643 # ("-fno-asynchronous-unwind-tables" breaks Nim's exception raising, sometimes)
3744 switch (" passC" , " -mno-avx512vl" )
45+ switch (" passL" , " -mno-avx512vl" )
3846
3947-- threads:on
4048-- opt:speed
0 commit comments