distribution-scripts icon indicating copy to clipboard operation
distribution-scripts copied to clipboard

[WIP] make darwin work for MacOS M1

Open miry opened this issue 2 years ago • 2 comments

I am contributing to this repo to be able build and test crystal on Darwin arm64. There are some work required to be done. I am going to split my changes in small PRs:

  • [x] https://github.com/crystal-lang/distribution-scripts/pull/263
  • [ ] https://github.com/crystal-lang/distribution-scripts/issues/267
  • [ ] https://github.com/crystal-lang/distribution-scripts/pull/266
  • [ ] https://github.com/crystal-lang/distribution-scripts/pull/265

Extra:

  • [ ] https://github.com/crystal-lang/distribution-scripts/pull/269
  • [ ] Create a Makefile in root folder to run make darwin
  • [ ] LLVM supports name arm64-apple-darwin, the aarch64-apple-darwin could be replaced. (llvm-config --host-target #=> arm64-apple-darwin23.0.0)

Testing

  • [ ] Check https://github.com/crystal-lang/crystal/blob/master/.circleci/config.yml if it is possible to test changes on fork

miry avatar Nov 12 '23 12:11 miry

I made my setup to build at least something after few days of working. My dirty working branch: https://github.com/crystal-lang/distribution-scripts/compare/master...miry:distribution-scripts:125-support-arm

Next step is to split it to small prs.

miry avatar Nov 12 '23 17:11 miry

From chat:

distribution-scripts is basically just outsourced packaging part of https://github.com/crystal-lang/crystal. It's used only from the main repo's CI. So in order to test changes, we push a special branch on crystal which updates the reference of distribution-scripts to the branch with your changes.
sed -i -E "/distribution-scripts-version:/{n;n;n;s/default: \".*\"/default: \"$yourCommitSHA\"/}" .circleci/config.yml 

miry avatar Nov 13 '23 13:11 miry