-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Arm64 Build for Apple Silicon? #8664
Comments
@mroch Any progress on that? It's been almost a year since changes needed for Apple Silicon build were introduced #8616 and it's been established that native arm64 build is 2x as fast as running Flow via Rosetta. I understand that setting up CI for this is troublesome, but by now, Apple Silicon is the new standard so native builds on Flow releases would be highly, highly appreciated PS: If anyone reading this wants to use Apple Silicon builds today, |
I know it's not nice to do, but really, bump. I wonder if you could use the Docker ARM emulation to build it? https://www.stereolabs.com/docs/docker/building-arm-container-on-x86/ |
I think it should be possible to add it to the CircleCI job, I'll give it another go-around today, but that depends on FB staff wanting to merge it. |
I don't believe it will be possible to cross compile on an intel Mac without something like https://github.com/ocaml-cross/opam-cross-windows. The compiler and ppxs would need to be built for intel but the rest of the artifacts for M1. But happy to be surprised if you can get it working @STRML! We will add this as soon as M1 hosts are available in CI. |
There may be a (slow) way to make this work using |
Yeah I'm way off base on that idea. You can use If you want something that will work natively on MacOS (aarch64-apple-darwin), it's more of a problem. You really seem to need an actual M1 host, or you need a way of passing flags to gcc directly like in the Apple docs so you can build a universal binary. I don't know enough about |
@STRML it looks like they found a solution using GitHub Actions here? https://discuss.ocaml.org/t/cross-compiling-ocaml-with-github-actions/9154 |
Hello? Isn't Facebook using the new Macs for development? |
we have internal M1 builds, yeah. we're still waiting on CircleCI to launch M1 runners to integrate with our external releases, which we're told is Real Soon Now. i'm frustrated it's taking so long as well... |
Looking at this, it looks like ARM mac is coming soon from CircleCI. |
Yes, you might see that we already started to build it on mac arm: https://app.circleci.com/pipelines/github/facebook/flow/5541/workflows/ed21b666-0e64-435f-88ca-1f1623ed0c51/jobs/97719 |
When can we expect the osx-arm64 build to be included in NPM flow-bin? That would be very helpful, thanks |
Any update on this? The ARM binary has been available for a while already but it's not yet included in npm releases. |
Proposal
I would like to explore how we can configure CircleCI to build a native arm64 binary for macOS, so it can be used on M1 developer machines via
flow-bin
.Use case
I was able to build
flow
on my M1 with the following small changes (ocamlbuild 4.10.2 or 4.12.0 is required for M1 support):The performance is substantially better (2x performance) than through Rosetta 2:
x86:
native arm64:
I am not familiar enough with ocamlbuild to know if there is a way for us to output an ARM64 binary on an Intel Mac builder, as CircleCI does not yet provide M1 support.
I'm experimenting with how to get it working in this CircleCI job, but they are currently having an outage.
The text was updated successfully, but these errors were encountered: