dsharlet / array

C++ multidimensional arrays in the spirit of the STL
Apache License 2.0
198 stars 15 forks source link

`make` broken on Apple Silicon Macs with Xcode #70

Closed jiawen closed 2 years ago

jiawen commented 2 years ago

It complains:

$ make
mkdir -p obj/test
c++ -I. -c -o obj/test/algorithm.o test/algorithm.cpp  -O2 -ffast-math -fstrict-aliasing -march=native  -std=c++14 -Wall
clang: error: the clang compiler does not support '-march=native'
make: *** [obj/test/algorithm.o] Error 1

This is because Apple Clang bundled with Xcode no longer supports the flag. They want you to pass something like -mcpu=apple-a14.

dsharlet commented 2 years ago

That's pretty annoying. There's no flag for "target CPUs at most 8 years old of any architecture".

We should probably just remove it and leave it as default. We won't target reasonable baseline assumptions like AVX in the tests, but I guess for most of what the tests are doing, that's fine.