-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add arm64 builds for macOS #1
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great. I honestly should have included architectures in the archive file names from the beginning, but I'm happy to have them now. We'll need to update Dafny in minor ways to take advantage of 4.12.2, anyway, so adapting it to the new archive names won't really be any extra work.
(cd build && make -j4 && cp z3$EXECUTABLE_EXT $BIN/$SOLVER$EXECUTABLE_EXT) | ||
strip $BIN/$SOLVER$EXECUTABLE_EXT | ||
$BIN/$SOLVER$EXECUTABLE_EXT --version | ||
|
||
if [[ "$ARCH" == 'x64' ]] ; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason this doesn't work on arm64
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
arm64
binaries are produced by cross compilation on an x64
github machine, so we can't just run and test them without using some kind of emulation. Any attempt to run it will fail with the Bad CPU type in executable
error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future we can try to replace cross compilation with native arm64
builds using github/roadmap#528
Ah, it failed in the same way I noticed when I first tried to add 4.12.2. I might revert my earlier change. Would you be up for adapting this to 4.12.1 if I do that? |
I've reset |
Done! |
This is a PR for the changes proposed in dafny-lang/dafny#4304. It adds arm64 builds for macOS 11 and 12 for z3-4.12.2. I've tried to add arm64 builds for Linux as well, but it is not possible to do using
mk_make.py
script alone: it seems one should use cmake directly instead. So, maybe next time.Also I've changed the naming scheme of the generated artifacts: it now includes the arch of the binary. This requires changes to the Dafny code.
Btw, GitHub Actions matrix looks a bit convoluted now, but I wasn't able to find a simpler way of adding 2 specific builds into it.