[PATCH] D120681: [Windows] Don't try to use x64 linker on ARM64 Windows.
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 28 17:01:06 PST 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGcb254d591981: [Windows] Don't try to use x64 linker on ARM64 Windows. (authored by efriedma).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120681/new/
https://reviews.llvm.org/D120681
Files:
llvm/lib/WindowsDriver/MSVCPaths.cpp
Index: llvm/lib/WindowsDriver/MSVCPaths.cpp
===================================================================
--- llvm/lib/WindowsDriver/MSVCPaths.cpp
+++ llvm/lib/WindowsDriver/MSVCPaths.cpp
@@ -359,7 +359,16 @@
switch (Type) {
case SubDirectoryType::Bin:
if (VSLayout == ToolsetLayout::VS2017OrNewer) {
- const bool HostIsX64 = Triple(sys::getProcessTriple()).isArch64Bit();
+ // MSVC ships with two linkers: a 32-bit x86 and 64-bit x86 linker.
+ // On x86, pick the linker that corresponds to the current process.
+ // On ARM64, pick the 32-bit x86 linker; the 64-bit one doesn't run
+ // on Windows 10.
+ //
+ // FIXME: Consider using IsWow64GuestMachineSupported to figure out
+ // if we can invoke the 64-bit linker. It's generally preferable
+ // because it won't run out of address-space.
+ const bool HostIsX64 =
+ Triple(sys::getProcessTriple()).getArch() == Triple::x86_64;
const char *const HostName = HostIsX64 ? "Hostx64" : "Hostx86";
sys::path::append(Path, "bin", HostName, SubdirName);
} else { // OlderVS or DevDivInternal
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120681.411931.patch
Type: text/x-patch
Size: 1132 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220301/e7513de4/attachment.bin>
More information about the llvm-commits
mailing list