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

Support ARM64 Windows dual-toolchain MSVC cross-compilation #27

Open
jkunkee opened this issue Feb 11, 2019 · 3 comments
Open

Support ARM64 Windows dual-toolchain MSVC cross-compilation #27

jkunkee opened this issue Feb 11, 2019 · 3 comments

Comments

@jkunkee
Copy link
Contributor

jkunkee commented Feb 11, 2019

The simplest cross-compilation scenario is compiling source on one architecture for another. Currently, MSVC and GYP both support this for ARM64--that is, MSVC provides x64-arm64 and x86-arm64 toolchains, while GYP supports generating MSVC projects that use either of these.

If the project requires compiling and then running tools (such as v8's mksnapshot during the Node.js build), then both the ARM64 and x64 toolchains need to be invoked during the build. MSVC partially supports this--each project can contain multiple configurations--but currently GYP only supports using one toolchain at a time. See https://github.com/refack/GYP/blob/master/pylib/gyp/generator/msvs.py#L1849

The simplest solution would be to support emitting projects with two toolchain configurations, then letting the user invoke msbuild twice with two configurations.

The ideal solution would be to use msbuild magic to emit projects such that msbuild need only be invoked once, but I don't know if this is possible.

@refack
Copy link
Owner

refack commented Feb 11, 2019

My instinct is to say - let's get this working with ninja first...

@jkunkee
Copy link
Contributor Author

jkunkee commented Feb 12, 2019

From the code comments and the build markup, I would be surprised if it weren't already working with ninja. I got the impression the only way it didn't work was with the msbuild generator...but I have not yet tried.

N.B. This would be cool and convenient, but I expect this to be a lot of work and so I have no expectations around timing.

@jkunkee
Copy link
Contributor Author

jkunkee commented Feb 26, 2019

This issue could be resolved by this PR: nodejs/node-gyp#1678

(Presumably the submitter has done basic validation, but I haven't validated it myself.)

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

No branches or pull requests

2 participants