[PATCH] D12541: [Sparc][Shave]: Empower the toolchain formerly known as SHAVE to do more.

James Y Knight via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 2 15:24:20 PDT 2015


jyknight added inline comments.

================
Comment at: lib/Driver/ToolChains.cpp:3936
@@ -3914,9 +3935,3 @@
 
-SHAVEToolChain::SHAVEToolChain(const Driver &D, const llvm::Triple &Triple,
-                               const ArgList &Args)
-    : Generic_GCC(D, Triple, Args) {}
-
-SHAVEToolChain::~SHAVEToolChain() {}
-
-/// Following are methods necessary to avoid having moviClang be an abstract
-/// class.
+void MyriadToolChain::getCompilerSupportDir(std::string &Dir) const {
+  // This directory contains crt{i,n,begin,end}.o as well as libgcc.
----------------
I wonder if it would be a good idea to add support for other suffixes like "le" to the findBiarchMultilibs or somewhere around there instead of hardcoding le/ here.

It looks like gcc has a whole bunch more things listed as possible MULTILIB_DIRNAMES for various targets. But LLVM seems to implement all the generality only for MIPS.

================
Comment at: lib/Driver/ToolChains.h:934
@@ +933,3 @@
+    // Or looked at another way - T might be the uncanonical triple.
+    return !(T.getArch() == llvm::Triple::sparcel ||
+             T.getArch() == llvm::Triple::sparc);
----------------
Why is this not "T.getArch() == llvm::Triple::shave"?

================
Comment at: lib/Driver/Tools.cpp:9689
@@ +9688,3 @@
+    if (T.getOS() == llvm::Triple::RTEMS) {
+      CmdArgs.push_back(Args.MakeArgString(StartFilesDir + "/crti.o"));
+      CmdArgs.push_back(Args.MakeArgString(StartFilesDir + "/crtbegin.o"));
----------------
Isn't whether this is needed dependent upon c++ vs not-c++, rather than rtems vs not-rtems?


http://reviews.llvm.org/D12541





More information about the cfe-commits mailing list