Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

M1 compilation error #652

Open
poterba opened this issue Feb 16, 2022 · 2 comments
Open

M1 compilation error #652

poterba opened this issue Feb 16, 2022 · 2 comments

Comments

@poterba
Copy link

poterba commented Feb 16, 2022

Tried to compile nana at AppleClang in Release configuration, got this:
the clang compiler does not support '-march=native'

I'm pretty sure the guilty line is in compilers.cmake

set(CMAKE_CXX_FLAGS_RELEASE "-O3 -march=native -mtune=native -DNDEBUG")

but now I don't know what to do about it.

Apple clang version 13.0.0 (clang-1300.0.29.3)
Target: arm64-apple-darwin21.3.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
@kmilos
Copy link

kmilos commented Mar 11, 2022

Just remove the line. The CMake default Release flags " -O3 -DNDEBUG" will apply and work fine, just make sure you have -D CMAKE_BUILD_TYPE=Release when you run cmake...

@poterba
Copy link
Author

poterba commented Mar 19, 2022

I know, but maybe it's better to include such condition into main code?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants