[PATCH] clang-cl: Implement the -arch flag

Hans Wennborg hans at chromium.org
Tue Jul 15 08:33:25 PDT 2014


Nice!

If this is for PR20213 (though I guess this doesn't solve the SSSE3 problem?), please put that in the description.

================
Comment at: lib/Driver/Tools.cpp:1450
@@ +1449,3 @@
+  // Set features according to the -arch flag on MSVC
+  if (Triple.isKnownWindowsMSVCEnvironment()) {
+    if (Arg *A = Args.getLastArg(options::OPT__SLASH_arch)) {
----------------
Do we need this check? The option can only be specified in clang-cl mode anyway.

================
Comment at: lib/Driver/Tools.cpp:1453
@@ +1452,3 @@
+      std::string Arch = A->getValue();
+      std::transform(Arch.begin(), Arch.end(), Arch.begin(), std::tolower);
+      // First, look for flags that are shared in x86 and x86-64.
----------------
Is MSVC really case insensitive here? I get "ignored unknown option" for /arch:ia32, but it accepts /arch:IA32.

================
Comment at: lib/Driver/Tools.cpp:1465
@@ +1464,3 @@
+      }
+    }
+  }
----------------
It would be nice to warn about unknown Arch values.

http://reviews.llvm.org/D4519






More information about the cfe-commits mailing list