summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.h
diff options
context:
space:
mode:
authorDouglas Katzman <dougk@google.com>2015-06-19 14:55:19 +0000
committerDouglas Katzman <dougk@google.com>2015-06-19 14:55:19 +0000
commit84a7564b28360843ee9afec5d3823c89623eb6a5 (patch)
treea247c458f5d2fab3633641a5797f9c0338b1771b /clang/lib/Driver/Tools.h
parent9fed25056675398c3df288c01c4aafce061be792 (diff)
downloadbcm5719-llvm-84a7564b28360843ee9afec5d3823c89623eb6a5.tar.gz
bcm5719-llvm-84a7564b28360843ee9afec5d3823c89623eb6a5.zip
Add nominal support for 'shave' target.
This change passes through C and assembler jobs to Movidius tools by constructing commands which are the same as ones produces by the examples in the SDK. But rather than reference MV_TOOLS_DIR to find tools, we will assume that binaries are installed wherever the Driver would find its native tools. Similarly, this change assumes that -I options will "just work" based on where SDK headers get installed, rather than baking into the Driver some magic paths. Differential Revision: http://reviews.llvm.org/D10440 llvm-svn: 240134
Diffstat (limited to 'clang/lib/Driver/Tools.h')
-rw-r--r--clang/lib/Driver/Tools.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.h b/clang/lib/Driver/Tools.h
index 17df22ed598..753f542622f 100644
--- a/clang/lib/Driver/Tools.h
+++ b/clang/lib/Driver/Tools.h
@@ -733,6 +733,33 @@ public:
};
}
+/// SHAVE tools -- Directly call moviCompile and moviAsm
+namespace SHAVE {
+class LLVM_LIBRARY_VISIBILITY Compile : public Tool {
+public:
+ Compile(const ToolChain &TC) : Tool("moviCompile", "movicompile", TC) {}
+
+ bool hasIntegratedCPP() const override { return true; }
+
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output, const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
+};
+
+class LLVM_LIBRARY_VISIBILITY Assemble : public Tool {
+public:
+ Assemble(const ToolChain &TC) : Tool("moviAsm", "moviAsm", TC) {}
+
+ bool hasIntegratedCPP() const override { return false; } // not sure.
+
+ void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output, const InputInfoList &Inputs,
+ const llvm::opt::ArgList &TCArgs,
+ const char *LinkingOutput) const override;
+};
+} // end namespace SHAVE
+
} // end namespace tools
} // end namespace driver
} // end namespace clang
OpenPOWER on IntegriCloud