This is an archive of the discontinued LLVM Phabricator instance.

[Windows] Don't try to use x64 linker on ARM64 Windows.
ClosedPublic

Authored by efriedma on Feb 28 2022, 1:41 PM.

Details

Summary

Trying to invoke an x64 binary on ARM64 Windows 10 won't work, and will print an obscure error message. Choose the 32-bit linker instead, which will run under emulation.

The x64 linker should in theory run under ARM64 Windows 11. We could detect this using IsWow64GuestMachineSupported(), but I don't have a setup to test that with at the moment.

Diff Detail

Event Timeline

efriedma created this revision.Feb 28 2022, 1:41 PM
efriedma requested review of this revision.Feb 28 2022, 1:41 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 28 2022, 1:41 PM
mstorsjo accepted this revision.Feb 28 2022, 1:44 PM

LGTM, that sounds reasonable.

This revision is now accepted and ready to land.Feb 28 2022, 1:44 PM
rnk accepted this revision.Feb 28 2022, 3:01 PM

lgtm

This feels like a convoluted way to avoid ifdefs, but it's fine.

This revision was landed with ongoing or failed builds.Feb 28 2022, 5:01 PM
This revision was automatically updated to reflect the committed changes.