[PATCH] D22426: Fix automatic detection of ARM MSVC toolset in clang.exe

Dave Bartolomeo via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 15 14:46:26 PDT 2016


DaveBartolomeo created this revision.
DaveBartolomeo added reviewers: rnk, majnemer, cfe-commits.
Herald added subscribers: rengolin, aemerson.

Clang was failing to find the ARM version of the MSVC link.exe, even though it could correctly find link.exe for x86 and x64. Clang looks in the %VCINSTALLDIR%\VC\bin directory for link.exe when targeting x86 (finding the x86-hosted, x86-targeting tools), the VC\bin\amd64 directory when targeting x64 (finding the x64-hosted, x64-targeting tools), and the non-existent VC\bin\arm directory when targeting ARM (which is where the ARM-hosted tools would be if they existed). I just switched it to always look for the x86-hosted tools for all targets, in VC\bin\x86, VC\bin\x86_amd64, or VC\bin\x86_arm.


https://reviews.llvm.org/D22426

Files:
  lib/Driver/MSVCToolChain.cpp

Index: lib/Driver/MSVCToolChain.cpp
===================================================================
--- lib/Driver/MSVCToolChain.cpp
+++ lib/Driver/MSVCToolChain.cpp
@@ -457,10 +457,10 @@
   case llvm::Triple::x86:
     break;
   case llvm::Triple::x86_64:
-    llvm::sys::path::append(BinDir, "amd64");
+    llvm::sys::path::append(BinDir, "x86_amd64");
     break;
   case llvm::Triple::arm:
-    llvm::sys::path::append(BinDir, "arm");
+    llvm::sys::path::append(BinDir, "x86_arm");
     break;
   default:
     // Whatever this is, Visual Studio doesn't have a toolchain for it.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22426.64197.patch
Type: text/x-patch
Size: 601 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160715/71f9b081/attachment.bin>


More information about the cfe-commits mailing list