Skip to content

Apple silicon support#2286

Merged
rv-jenkins merged 12 commits intomasterfrom
apple-silicon
Nov 9, 2021
Merged

Apple silicon support#2286
rv-jenkins merged 12 commits intomasterfrom
apple-silicon

Conversation

@Baltoli
Copy link
Contributor

@Baltoli Baltoli commented Oct 28, 2021

This PR implements Apple Silicon support for the K framework. The changes required to do so are as follows:

  • Update Jansi dependency to 2.4.0
    • Jansi uses native code bindings to call system functions like isatty; these bindings are precompiled and distributed with the library.
    • 2.4.0 is the first version that distributes a working native library for macOS on ARM.
  • Update Jline dependency to 3.21.0
    • Jline bundles Jansi, and so we need to update to a newer version of Jline to avoid transitively dragging in an older version of Jansi (this is the cause of the issue noted here by @ACassimiro).
    • Making this change entails some minor API changes where we use Jline and Jansi; none of these are complex.
  • Adds a line to the haskell-backend POM to pass in the additional options to stack that are currently required to build the backend (see the documentation and associated PR for more details).
  • For ease of working on this PR on my M1 machine, it pulls in the build system changes in Initial build support for AS llvm-backend#443.
    • The backend PR should be merged and the submodule updated before this PR is, as the build system changes to the backend shouldn't affect anything not on Apple Silicon in the frontend.
    • Then, this PR can be merged once the submodule is updated.
  • This PR shouldn't be merged until the MPFR dependency has been separately pushed to Maven and updated.

@Baltoli
Copy link
Contributor Author

Baltoli commented Oct 29, 2021

Blocked until #2290 is merged.

@Baltoli Baltoli marked this pull request as ready for review November 8, 2021 12:54
@Baltoli Baltoli requested a review from dwightguth November 8, 2021 12:54
@Baltoli
Copy link
Contributor Author

Baltoli commented Nov 8, 2021

@dwightguth This PR doesn't produce a perfectly-working toolchain on ARM, by the way - there are a few minor issues I'm going to write up as separate fixes in the interest of:

  1. Keeping this PR to a manageable size and single focus (i.e. fixing the _build_ issues for Apple Silicon)
  2. Merging to produce a mostly-working toolchain that people are able to use before we have CI requirements

@rv-jenkins rv-jenkins merged commit e7838f1 into master Nov 9, 2021
@rv-jenkins rv-jenkins deleted the apple-silicon branch November 9, 2021 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants