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

Backport node v15 Apple Silicon support to v14.x #38005

Closed
a60814billy opened this issue Mar 31, 2021 · 2 comments
Closed

Backport node v15 Apple Silicon support to v14.x #38005

a60814billy opened this issue Mar 31, 2021 · 2 comments
Labels
feature request Issues that request new features to be added to Node.js. macos Issues and PRs related to the macOS platform / OSX.

Comments

@a60814billy
Copy link

Is your feature request related to a problem? Please describe.

Due to stability considerations, many projects only support the latest LTS version of Node.js.
Although we can running these application on Rosetta 2, but it's not efficiency on Apple Silicon chip.

Therefore, I'm trying to find how to backport Apple Silicon support to node 14.

The issue #37309 says support Apple Silicon on node 14 requiring a SemVer Major V8 update,
but, I found the smallst changes in v8 to support Apple Silicon on node 14.

Describe the solution you'd like

Just need to apply these 5 changes to v14.16.0 source code.

  1. Cherry-pick V8 fixes needed for Apple Silicon #35986
  2. test: add SIGTRAP to test-signal-handler #36368
  3. deps: V8: workaround for darwin arm64 code page decommit failures #37276
  4. deps: cherry-pick 8957d4677aa794c230577f234071af0 from V8 upstream #37471
  5. v8/v8@cf71540

And I creates a patch file.
There are only 19 files changed, 168 insertions(+), 27 deletions(-).

I think this is the minimum code changes to support Apple Silicon.

Also I create a repo to prove my idea is right, it's compile on my M1 chip Macbook air successfully, and pass all tests.

Describe alternatives you've considered
May I create a pull request to backport Apple Silicon support to v14?

@Ayase-252 Ayase-252 added feature request Issues that request new features to be added to Node.js. macos Issues and PRs related to the macOS platform / OSX. v14.x labels Mar 31, 2021
@evanlucas
Copy link
Contributor

Please do! I’ve been meaning to I just kept getting sidetracked. We aren’t yet publishing official releases for arm64 on Mac yet though. That progress can be found in #37309

a60814billy added a commit to a60814billy/node that referenced this issue Apr 2, 2021
Original commit message:
    mac/arm64: Port SignalHandler::FillRegisterState().

    Bug: chromium:1098899
    Change-Id: I3ff79c00063f7da36b141a3a7b0d2daa71c9801a
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2270705
    Commit-Queue: Peter Marshall <petermarshall@chromium.org>
    Reviewed-by: Peter Marshall <petermarshall@chromium.org>
    Auto-Submit: Nico Weber <thakis@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#68568}

Refs: nodejs#35415, nodejs#38005
a60814billy added a commit to a60814billy/node that referenced this issue Apr 2, 2021
Original commit message:
    mac/arm64: Port SignalHandler::FillRegisterState().

    Bug: chromium:1098899
    Change-Id: I3ff79c00063f7da36b141a3a7b0d2daa71c9801a
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2270705
    Commit-Queue: Peter Marshall <petermarshall@chromium.org>
    Reviewed-by: Peter Marshall <petermarshall@chromium.org>
    Auto-Submit: Nico Weber <thakis@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#68568}

Refs: nodejs#35415, nodejs#38005
targos pushed a commit that referenced this issue Apr 11, 2021
Original commit message:

    mac/arm64: Port SignalHandler::FillRegisterState().

    Bug: chromium:1098899
    Change-Id: I3ff79c00063f7da36b141a3a7b0d2daa71c9801a
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2270705
    Commit-Queue: Peter Marshall <petermarshall@chromium.org>
    Reviewed-by: Peter Marshall <petermarshall@chromium.org>
    Auto-Submit: Nico Weber <thakis@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#68568}

Refs: v8/v8@cf71540

PR-URL: #38051
Refs: #35415
Fixes: #38005
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
@targos
Copy link
Member

targos commented Apr 11, 2021

fixed by #38051

@targos targos closed this as completed Apr 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issues that request new features to be added to Node.js. macos Issues and PRs related to the macOS platform / OSX.
Projects
None yet
Development

No branches or pull requests

4 participants