Skip to content

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

@jkunkee

Description

@jkunkee

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions