[lld] r241853 - COFF: Fix command line options for external commands.

Rui Ueyama ruiu at google.com
Thu Jul 9 13:22:39 PDT 2015


Author: ruiu
Date: Thu Jul  9 15:22:39 2015
New Revision: 241853

URL: http://llvm.org/viewvc/llvm-project?rev=241853&view=rev
Log:
COFF: Fix command line options for external commands.

Modified:
    lld/trunk/COFF/DriverUtils.cpp

Modified: lld/trunk/COFF/DriverUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/DriverUtils.cpp?rev=241853&r1=241852&r2=241853&view=diff
==============================================================================
--- lld/trunk/COFF/DriverUtils.cpp (original)
+++ lld/trunk/COFF/DriverUtils.cpp Thu Jul  9 15:22:39 2015
@@ -488,7 +488,7 @@ convertResToCOFF(const std::vector<Memor
 
   // Execute cvtres.exe.
   Executor E("cvtres.exe");
-  E.add("/machine:x64");
+  E.add("/machine:" + machineTypeToStr(Config->MachineType));
   E.add("/readonly");
   E.add("/nologo");
   E.add("/out:" + Path);
@@ -541,7 +541,7 @@ std::error_code writeImportLibrary() {
 
   Executor E("lib.exe");
   E.add("/nologo");
-  E.add("/machine:x64");
+  E.add("/machine:" + machineTypeToStr(Config->MachineType));
   E.add(Twine("/def:") + Def);
   if (Config->Implib.empty()) {
     SmallString<128> Out = StringRef(Config->OutputFile);





More information about the llvm-commits mailing list