Skip to content

Apple Silicon #49

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

Closed
momakes2 opened this issue Jan 27, 2021 · 3 comments · Fixed by #50
Closed

Apple Silicon #49

momakes2 opened this issue Jan 27, 2021 · 3 comments · Fixed by #50

Comments

@momakes2
Copy link

Version
2.1
Short overview
Release fat binaries for macOS to work on Apple Silicon

Steps to reproduce error
M1 Macs fail at running the built version.

Fix
Build using both archs:

cmake-js rebuild --CDNODE_ARCH="arm64;x86_64" --CDCMAKE_OSX_ARCHITECTURES="arm64;x86_64"

And it'll result in both binaries being included:

lipo -info build/Release/libnut.node
# Architectures in the fat file: build/Release/libnut.node are: x86_64 arm64
@s1hofmann
Copy link
Member

Hi @momakes2 👋

Thanks for pointing this out. As I do not have access to M1 hardware I’m unable to test on it.

Would you be interested in opening a PR which incorporates your suggested flags into CMakeLists.txt?

@momakes2
Copy link
Author

@s1hofmann Sure! But I have no background using CMake (or C) so I please hint me on the CMake Lists and I'll make a PR.
Then should I only test the yarn build:release command? I tried it last night and It worked using this flag.

Will open a PR.

@momakes2
Copy link
Author

Done. I have an M1 Macbook, so feel free to ping me for testing stuff.

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

Successfully merging a pull request may close this issue.

2 participants