-
Notifications
You must be signed in to change notification settings - Fork 65
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 fat binaries on macosx #294
Conversation
Yes ... it's good! |
Epic. I've got a x86 mac so I should be able to test this :) Remind me if I forget, got lots of other stuff to do this weekend. |
Great! I tried getting Nim itself to compile a fat binary too. But, there's too many levels of bootstrap builds. It did produce arm64 native builds. Any thoughts on which stage I'd need to modify to get the Nim compiler to build a fat binary? |
Hello, will u merge this? We have to manual compile and install nim from source till now. |
I suppose unsurprisingly I cannot build with these flags on a x86 Mac. So I cannot test it. But I will merge and we can see if @marcomq's build script succeeds in building binaries for this. |
Reverted in e9ed20d but would appreciate a fix :) |
I think it's due to Zippy dependency which use |
Thanks! Though making choosenim a fat binary doesn't fix the compiler itself. That might require setting up choosenim to download a different Nim binary when it's run on MacOS/ARM. |
Yeah ...
Choosenim also use proxy binaries. So, we can't build universal bin. Instead, we have to use separate choosenim arm64 and amd64. What do u think? |
Personally I think that implementing arm support for choosenim is far more important than making choosenim itself a fat binary. As long as macOS will support Rosetta it should be fine. What this ideally means is also arm Linux support. But this is trickier. If we can get choosenim to build an arm macOS Nim that would be a great first step. |
Yeah ... I see. Let me attempt to create a PR. |
Hello ... I've created an initial patch that works: #301. I think I need to M1 user to test this 🤔 . |
@heinthanth awesome! I'll test it out here and see if it works. |
It looks like choosenim is still using rosetta x86 builds for M1 based Macs. This change should get the macosx build to generate "fat binaries" that support both x86_64 and arm64 variants.
I'm testing it on my M1, but don't have access to an x86 Mac to verify the binaries work there as well.