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

win,msi: use x64 node executable when cross-compiling for arm64 #34009

Closed

Conversation

Copy link
Contributor

@dennisameling dennisameling commented Jun 22, 2020

Builds further on #33689

The last step to successfully create MSI installers for arm64 on a x64 host is to run the license2rtf script on the x64 host using a x64 Node executable. Based on @joaocgreis's comment in #33689 (review) I came up with some logic in vcbuild.bat which downloads the latest x64 Node executable if it's not present on the machine yet.

A variable called %x64_node_exe% can be passed by your CI pipeline so that the build machines don't have to download the x64 executable all the time.

IMPORTANT: when building an MSI for ARM64, WIX 3.14 or higher is required, as that version includes support for ARM64.

How to test

  • Run vcbuild.bat release msi arm64

Before applying this PR, the process fails with Failed to generate license.rtf (because the generated node.exe is for the arm64 architecture and therefore can't run on the x64 host).

After applying this PR, the process finishes successfully.

Refs: #25998
Refs: #32582

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added build doc meta windows labels Jun 22, 2020
@dennisameling dennisameling changed the title Use x64 node executable when cross-compiling for arm64 win,msi: use x64 node executable when cross-compiling for arm64 Jun 22, 2020
Copy link
Member

@joaocgreis joaocgreis left a comment

@dennisameling again, thanks for pushing this forward!

The general approach looks good, but there are some things that need to change before this can land.

vcbuild.bat Outdated Show resolved Hide resolved
vcbuild.bat Outdated Show resolved Hide resolved
Uses x64 node executable for running .js files in arm64
cross-compilation scenarios. MSI can now be created by
running `vcbuild.bat release msi arm64`

Refs: nodejs#25998
Refs: nodejs#32582
Updates the build instructions for Windows 10 ARM64, now that cross-compiling on a x64 host is possible.

Refs: nodejs#25998
Refs: nodejs#32582
@dennisameling dennisameling requested a review from joaocgreis Aug 8, 2020
@dennisameling
Copy link
Contributor Author

@dennisameling dennisameling commented Aug 8, 2020

@joaocgreis Apologies for the late reply. I've applied your suggestions, so we should be good to go now for this PR 😊

@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Aug 11, 2020

Copy link
Member

@joaocgreis joaocgreis left a comment

@dennisameling again, thanks for pushing this forward!

BUILDING.md Outdated Show resolved Hide resolved
vcbuild.bat Outdated Show resolved Hide resolved
Co-authored-by: João Reis <reis@janeasystems.com>
@richardlau richardlau added the request-ci label Aug 11, 2020
@github-actions github-actions bot removed the request-ci label Aug 11, 2020
@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Aug 11, 2020

@richard-townsend-arm
Copy link
Contributor

@richard-townsend-arm richard-townsend-arm commented Aug 17, 2020

(Edit: commented in the wrong tab).

joaocgreis pushed a commit that referenced this issue Aug 19, 2020
Uses x64 node executable for running .js files in arm64
cross-compilation scenarios. MSI can now be created by
running `vcbuild.bat release msi arm64`

Refs: #25998
Refs: #32582
PR-URL: #34009
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: João Reis <reis@janeasystems.com>
@joaocgreis
Copy link
Member

@joaocgreis joaocgreis commented Aug 19, 2020

Landed in 03293aa

Thanks @dennisameling!

@joaocgreis joaocgreis closed this Aug 19, 2020
@dennisameling dennisameling deleted the vcbuild-windows-arm branch Aug 20, 2020
BethGriggs pushed a commit that referenced this issue Aug 20, 2020
Uses x64 node executable for running .js files in arm64
cross-compilation scenarios. MSI can now be created by
running `vcbuild.bat release msi arm64`

Refs: #25998
Refs: #32582
PR-URL: #34009
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: João Reis <reis@janeasystems.com>
@danielleadams danielleadams mentioned this pull request Aug 20, 2020
BethGriggs pushed a commit that referenced this issue Aug 20, 2020
Uses x64 node executable for running .js files in arm64
cross-compilation scenarios. MSI can now be created by
running `vcbuild.bat release msi arm64`

Refs: #25998
Refs: #32582
PR-URL: #34009
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: João Reis <reis@janeasystems.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build doc meta windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants