Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Build issue on macOS when targetting x64 from ARM mac #229

Open
jcelerier opened this issue Jul 16, 2024 · 1 comment
Open

Build issue on macOS when targetting x64 from ARM mac #229

jcelerier opened this issue Jul 16, 2024 · 1 comment

Comments

@jcelerier
Copy link
Contributor

jcelerier commented Jul 16, 2024

I'm seeing the following in my build log, when building with -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" :

-- Default CPU architecture for KFR is neon64 (set KFR_ARCH to override)
  Incorrect architecture set by KFR_ARCH: neon64

Most likely the cpu detector should handle rosetta ? Also, I wonder, how is the lib supposed to handle fat macOS binaries ?

thanks !

@dancazarin
Copy link
Member

dancazarin commented Jul 17, 2024

Fat binaries aren't supported at this moment because KFR requires specific compiler flags to enable SIMD and these flags are platform-specific. CMake doesn't provide a convenient way to set arch-specific flags.
So CMAKE_OSX_ARCHITECTURES should be set to either x86_64 or arm64 in a single build. Note that binaries built this way can be easily merged into a fat library.

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

No branches or pull requests

2 participants