[PATCH] Support standalone FSF Mips toolchain directories tree in the Clang driver

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Tue Oct 8 07:32:41 PDT 2013



================
Comment at: lib/Driver/ToolChains.cpp:1113
@@ -1112,3 +1113,4 @@
                                                "mipsel-linux-android",
+                                               "mips-mti-linux-gnu",
                                                "mips-linux-gnu" };
 
----------------
Is it always the case that a triple in MIPSTriples is also in MIPSELTriples? If so, can we represent that explicitly? Maybe have MIPSELTriples contain all the triples that are not in MIPSTriples and have the code check both for little endian?

================
Comment at: lib/Driver/ToolChains.cpp:1313
@@ +1312,3 @@
+
+  return A && (A->getOption().matches(options::OPT_mips32r2) ||
+              (A->getNumValues() && A->getValue() == StringRef("mips32r2")));
----------------
The option file has

def mips32r2 : Flag<["-"], "mips32r2">, Group<mips_CPUs_Group>,
  HelpText<"Equivalent to -march=mips32r2">, Flags<[HelpHidden]>;

Please convert that to an alias first (a patch doing that LGTM). That way you don't have to check it here.

================
Comment at: lib/Driver/ToolChains.cpp:1402
@@ +1401,3 @@
+  assert(!(IsMentorToolChain && IsFSFToolChain) &&
+         "Cannot recognize a toolchain");
+
----------------
a fatal error is probably better since a user can get here with a broken gcc installation.


http://llvm-reviews.chandlerc.com/D1843



More information about the cfe-commits mailing list