Skip to content

feat: port "add support for MSVC cross-compilation" from node#41

Merged
ryzokuken merged 3 commits intonodejs:masterfrom
targos:port-32867
May 29, 2020
Merged

feat: port "add support for MSVC cross-compilation" from node#41
ryzokuken merged 3 commits intonodejs:masterfrom
targos:port-32867

Conversation

@targos
Copy link
Copy Markdown
Member

@targos targos commented May 23, 2020

Original commit message:

tools,gyp: add support for MSVC cross-compilation

This change means that GYP can now generate two sets of projects: one
exclusively for a host x64 machine and one containing a mix of x64 and
Arm targets. The names of host targets are fixed up to end with
_host.exe, and any actions involving them are fixed up. This allows
compilation of Node on an x64 server for a Windows on Arm target.

Closes: #40

targos referenced this pull request in nodejs/node May 23, 2020
This change means that GYP can now generate two sets of projects: one
exclusively for a host x64 machine and one containing a mix of x64 and
Arm targets. The names of host targets are fixed up to end with
_host.exe, and any actions involving them are fixed up. This allows
compilation of Node on an x64 server for a Windows on Arm target.

PR-URL: #32867
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: João Reis <reis@janeasystems.com>
Comment thread pylib/gyp/input.py Outdated
Comment thread test_gyp.py Outdated
Copy link
Copy Markdown
Contributor

@ryzokuken ryzokuken left a comment

Choose a reason for hiding this comment

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

RSLGTM. I guess we can address @cclauss's comments in a single commit after the cherry-picked commit. Moving forwards, let's please make sure to close any PRs to gyp in the node/node-gyp source code and move them all to here.

targos added 2 commits May 28, 2020 13:36
Original commit message:

    tools,gyp: add support for MSVC cross-compilation

    This change means that GYP can now generate two sets of projects: one
    exclusively for a host x64 machine and one containing a mix of x64 and
    Arm targets. The names of host targets are fixed up to end with
    _host.exe, and any actions involving them are fixed up. This allows
    compilation of Node on an x64 server for a Windows on Arm target.

Refs: nodejs/node#32867
Closes: nodejs#40
@targos
Copy link
Copy Markdown
Member Author

targos commented May 28, 2020

Updated. Thanks for the review

Copy link
Copy Markdown
Contributor

@ryzokuken ryzokuken left a comment

Choose a reason for hiding this comment

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

New patch LGTM. @cclauss can you please re-review this? I'll land this once you approve.

Copy link
Copy Markdown
Contributor

@cclauss cclauss left a comment

Choose a reason for hiding this comment

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

RSLGTM

Comment thread pylib/gyp/generator/msvs.py Outdated
content += import_cpp_props_section
content += import_masm_props_section
if spec.get("msvs_enable_marmasm"):
if spec.get("msvs_enable_marmasm") or True:
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@richard-townsend-arm I copied this from the downstream commit but it doesn't look right.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Yes, I think my git commit -av habit has struck again! It should compile fine without or True, and (if not) I'll fix that.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

A quick build on my own branch indicates that everything compiles fine without this or True. Feel free to remove it here and I can push a new patch to Node.js to remove it from there.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thank you for verifying! No need to push a patch to Node.js, we're going to downstream more changes from here.

@targos
Copy link
Copy Markdown
Member Author

targos commented May 28, 2020

I'd like to wait for an answrer on #41 (comment) before merging.

@ryzokuken
Copy link
Copy Markdown
Contributor

@targos would you like to push a commit removing the unnecessary condition? Once that's done we could merge this 😄

Comment thread pylib/gyp/generator/msvs.py Outdated
@targos
Copy link
Copy Markdown
Member Author

targos commented May 28, 2020

@ryzokuken done

@ryzokuken ryzokuken merged commit 62b53cb into nodejs:master May 29, 2020
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.

upstream cross-compilation support for Windows on Arm

4 participants