summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.h
diff options
context:
space:
mode:
authorYaron Keren <yaron.keren@gmail.com>2015-07-02 04:45:27 +0000
committerYaron Keren <yaron.keren@gmail.com>2015-07-02 04:45:27 +0000
commit1c0070c65d8faacfe9f7cee222a49ee71209eeca (patch)
treee41a905477de414452ae2f64040da7eb2bc00259 /clang/lib/Driver/Tools.h
parentbb045d412f18dbb01bdf582130f73b25ea5e1e94 (diff)
downloadbcm5719-llvm-1c0070c65d8faacfe9f7cee222a49ee71209eeca.tar.gz
bcm5719-llvm-1c0070c65d8faacfe9f7cee222a49ee71209eeca.zip
Support mingw-w64 and mingw.org toolchains at any install location.
No more hardcoded paths: clang will use -sysroot as gcc root location if provided. Otherwise, it will search for gcc on the path. If not found it will use the driver installed location. http://reviews.llvm.org/D5268 Patch by Ruben Van Boxem, Martell Malone, Yaron Keren. Reviewed by Reid Kleckner. llvm-svn: 241241
Diffstat (limited to 'clang/lib/Driver/Tools.h')
-rw-r--r--clang/lib/Driver/Tools.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.h b/clang/lib/Driver/Tools.h
index 0cc7e6417a7..52ab731cbc4 100644
--- a/clang/lib/Driver/Tools.h
+++ b/clang/lib/Driver/Tools.h
@@ -675,6 +675,37 @@ public:
};
} // end namespace visualstudio
+/// MinGW -- Directly call GNU Binutils assembler and linker
+namespace MinGW {
+class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
+public:
+ Assembler(const ToolChain &TC) : Tool("MinGW::Assemble", "assembler", TC) {}
+
+ bool hasIntegratedCPP() const override { return false; }
+
+ 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 Linker : public Tool {
+public:
+ Linker(const ToolChain &TC) : Tool("MinGW::Linker", "linker", TC) {}
+
+ bool hasIntegratedCPP() const override { return false; }
+ bool isLinkJob() 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;
+
+private:
+ void AddLibGCC(const llvm::opt::ArgList &Args, ArgStringList &CmdArgs) const;
+};
+} // end namespace MinGW
+
namespace arm {
StringRef getARMFloatABI(const Driver &D, const llvm::opt::ArgList &Args,
const llvm::Triple &Triple);
OpenPOWER on IntegriCloud