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.


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.
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to