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

Handle CPU value darwin_arm64 #1739

Merged
merged 13 commits into from
May 19, 2022
Merged

Handle CPU value darwin_arm64 #1739

merged 13 commits into from
May 19, 2022

Conversation

avdv
Copy link
Member

@avdv avdv commented May 10, 2022

Purpose

Recognize the arm64 architecture correctly so that rules_haskell works on M1 Macs.

Fixes #1737

TODO

Follow ups

avdv added 12 commits May 16, 2022 10:40
This brings the versions in the generator script and the current versions in `ghc_bindist.bzl`
up to par.

Note, the `upstream` value of `ARCHES` is a list of names now, since for
different GHC versions, there are different supported Debian binary
distributions (e.g. GHC 8.8.4 has deb8 and deb9, but 8.10.1 does not support deb8
anymore).

The first available "upstream" that is available in the hashes is selected.
Skydoc is likely no problem anymore, since we are using Stardoc.
Since older versions of GHC do not support this architecture, a missing architecture for a
given version is no longer required and just leads to a warning.
- run `bazel run @rules_haskell//haskell:gen-ghc-bindist`
- format with buildifier
We use the amd64 binary, which also runs on M1 using Rosetta.
@avdv avdv force-pushed the support-darwin-arm64 branch 2 times, most recently from 07c175a to a065039 Compare May 16, 2022 08:53
Copy link
Member

@aherrmann aherrmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, looks great! Thanks for also adding bindist support!

@@ -15,6 +15,25 @@
# `ignore_prefixes` is the prefix of files to ignore
# `ignore_suffixes` is the suffix of files to ignore
VERSIONS = [
{ "version": "9.2.1",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks a lot for reviving this script!

Includes tweag/rules_sh#21 which adds support for arm64
for OSX and Windows.
@avdv avdv marked this pull request as ready for review May 19, 2022 12:12
@avdv avdv added the merge-queue merge on green CI label May 19, 2022
@mergify mergify bot merged commit b977474 into master May 19, 2022
@mergify mergify bot deleted the support-darwin-arm64 branch May 19, 2022 14:07
@mergify mergify bot removed the merge-queue merge on green CI label May 19, 2022
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 this pull request may close these issues.

Handle CPU value darwin_arm64
2 participants