Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 1 | //===--- Tools.h - Tool Implementations -------------------------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
Benjamin Kramer | 2f5db8b | 2014-08-13 16:25:19 +0000 | [diff] [blame] | 10 | #ifndef LLVM_CLANG_LIB_DRIVER_TOOLS_H |
| 11 | #define LLVM_CLANG_LIB_DRIVER_TOOLS_H |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 12 | |
| 13 | #include "clang/Driver/Tool.h" |
Daniel Dunbar | e6adeee | 2009-03-29 17:08:39 +0000 | [diff] [blame] | 14 | #include "clang/Driver/Types.h" |
Daniel Dunbar | a3246a0 | 2009-03-18 08:07:30 +0000 | [diff] [blame] | 15 | #include "clang/Driver/Util.h" |
Joerg Sonnenberger | 637603a | 2011-05-16 13:35:02 +0000 | [diff] [blame] | 16 | #include "llvm/ADT/Triple.h" |
Reid Kleckner | 898229a | 2013-06-14 17:17:23 +0000 | [diff] [blame] | 17 | #include "llvm/Option/Option.h" |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 18 | #include "llvm/Support/Compiler.h" |
| 19 | |
| 20 | namespace clang { |
John McCall | 5fb5df9 | 2012-06-20 06:18:46 +0000 | [diff] [blame] | 21 | class ObjCRuntime; |
| 22 | |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 23 | namespace driver { |
Hans Wennborg | 87cfa71 | 2013-09-19 20:32:16 +0000 | [diff] [blame] | 24 | class Command; |
Douglas Gregor | 111af7d | 2009-04-18 00:34:01 +0000 | [diff] [blame] | 25 | class Driver; |
| 26 | |
Daniel Dunbar | c196421 | 2009-03-26 16:23:12 +0000 | [diff] [blame] | 27 | namespace toolchains { |
Tim Northover | 157d911 | 2014-01-16 08:48:16 +0000 | [diff] [blame] | 28 | class MachO; |
Daniel Dunbar | c196421 | 2009-03-26 16:23:12 +0000 | [diff] [blame] | 29 | } |
| 30 | |
Daniel Dunbar | 15abb2e | 2009-03-17 22:18:43 +0000 | [diff] [blame] | 31 | namespace tools { |
Hans Wennborg | 1da044a | 2014-06-26 19:59:02 +0000 | [diff] [blame] | 32 | |
| 33 | namespace visualstudio { |
| 34 | class Compile; |
| 35 | } |
| 36 | |
Reid Kleckner | 898229a | 2013-06-14 17:17:23 +0000 | [diff] [blame] | 37 | using llvm::opt::ArgStringList; |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 38 | |
Daniel Dunbar | 4f5e79c | 2010-05-20 21:30:13 +0000 | [diff] [blame] | 39 | /// \brief Clang compiler tool. |
Duncan Sands | af260b9 | 2010-05-11 20:16:05 +0000 | [diff] [blame] | 40 | class LLVM_LIBRARY_VISIBILITY Clang : public Tool { |
Eric Christopher | 45f2e71 | 2012-12-18 00:31:10 +0000 | [diff] [blame] | 41 | public: |
Reid Kleckner | 724c21c | 2013-06-17 13:59:19 +0000 | [diff] [blame] | 42 | static const char *getBaseInputName(const llvm::opt::ArgList &Args, |
Artem Belevich | ba55895 | 2015-05-06 18:20:23 +0000 | [diff] [blame] | 43 | const InputInfo &Input); |
Reid Kleckner | 724c21c | 2013-06-17 13:59:19 +0000 | [diff] [blame] | 44 | static const char *getBaseInputStem(const llvm::opt::ArgList &Args, |
Bob Wilson | decc03e | 2012-11-23 06:14:39 +0000 | [diff] [blame] | 45 | const InputInfoList &Inputs); |
Reid Kleckner | 724c21c | 2013-06-17 13:59:19 +0000 | [diff] [blame] | 46 | static const char *getDependencyFileName(const llvm::opt::ArgList &Args, |
Bob Wilson | decc03e | 2012-11-23 06:14:39 +0000 | [diff] [blame] | 47 | const InputInfoList &Inputs); |
| 48 | |
Eric Christopher | 45f2e71 | 2012-12-18 00:31:10 +0000 | [diff] [blame] | 49 | private: |
Reid Kleckner | 724c21c | 2013-06-17 13:59:19 +0000 | [diff] [blame] | 50 | void AddPreprocessingOptions(Compilation &C, const JobAction &JA, |
Peter Collingbourne | 9b515cb | 2011-11-06 00:40:05 +0000 | [diff] [blame] | 51 | const Driver &D, |
Reid Kleckner | 724c21c | 2013-06-17 13:59:19 +0000 | [diff] [blame] | 52 | const llvm::opt::ArgList &Args, |
| 53 | llvm::opt::ArgStringList &CmdArgs, |
Daniel Dunbar | d067f7f | 2009-04-08 23:54:23 +0000 | [diff] [blame] | 54 | const InputInfo &Output, |
| 55 | const InputInfoList &Inputs) const; |
| 56 | |
Amara Emerson | 703da2e | 2013-10-31 09:32:33 +0000 | [diff] [blame] | 57 | void AddAArch64TargetArgs(const llvm::opt::ArgList &Args, |
| 58 | llvm::opt::ArgStringList &CmdArgs) const; |
Reid Kleckner | 724c21c | 2013-06-17 13:59:19 +0000 | [diff] [blame] | 59 | void AddARMTargetArgs(const llvm::opt::ArgList &Args, |
| 60 | llvm::opt::ArgStringList &CmdArgs, |
Daniel Dunbar | c9388c1 | 2011-03-17 17:10:06 +0000 | [diff] [blame] | 61 | bool KernelOrKext) const; |
Tim Northover | a2ee433 | 2014-03-29 15:09:45 +0000 | [diff] [blame] | 62 | void AddARM64TargetArgs(const llvm::opt::ArgList &Args, |
| 63 | llvm::opt::ArgStringList &CmdArgs) const; |
Reid Kleckner | 724c21c | 2013-06-17 13:59:19 +0000 | [diff] [blame] | 64 | void AddMIPSTargetArgs(const llvm::opt::ArgList &Args, |
| 65 | llvm::opt::ArgStringList &CmdArgs) const; |
Ulrich Weigand | 8afad61 | 2014-07-28 13:17:52 +0000 | [diff] [blame] | 66 | void AddPPCTargetArgs(const llvm::opt::ArgList &Args, |
| 67 | llvm::opt::ArgStringList &CmdArgs) const; |
Reid Kleckner | 724c21c | 2013-06-17 13:59:19 +0000 | [diff] [blame] | 68 | void AddR600TargetArgs(const llvm::opt::ArgList &Args, |
| 69 | llvm::opt::ArgStringList &CmdArgs) const; |
| 70 | void AddSparcTargetArgs(const llvm::opt::ArgList &Args, |
| 71 | llvm::opt::ArgStringList &CmdArgs) const; |
Richard Sandiford | 4652d89 | 2013-07-19 16:51:51 +0000 | [diff] [blame] | 72 | void AddSystemZTargetArgs(const llvm::opt::ArgList &Args, |
| 73 | llvm::opt::ArgStringList &CmdArgs) const; |
Reid Kleckner | 724c21c | 2013-06-17 13:59:19 +0000 | [diff] [blame] | 74 | void AddX86TargetArgs(const llvm::opt::ArgList &Args, |
| 75 | llvm::opt::ArgStringList &CmdArgs) const; |
| 76 | void AddHexagonTargetArgs(const llvm::opt::ArgList &Args, |
| 77 | llvm::opt::ArgStringList &CmdArgs) const; |
Daniel Dunbar | 3b3191f | 2009-09-09 22:33:08 +0000 | [diff] [blame] | 78 | |
John McCall | 5fb5df9 | 2012-06-20 06:18:46 +0000 | [diff] [blame] | 79 | enum RewriteKind { RK_None, RK_Fragile, RK_NonFragile }; |
| 80 | |
Reid Kleckner | 724c21c | 2013-06-17 13:59:19 +0000 | [diff] [blame] | 81 | ObjCRuntime AddObjCRuntimeArgs(const llvm::opt::ArgList &args, |
| 82 | llvm::opt::ArgStringList &cmdArgs, |
John McCall | 5fb5df9 | 2012-06-20 06:18:46 +0000 | [diff] [blame] | 83 | RewriteKind rewrite) const; |
| 84 | |
Hans Wennborg | 75958c4 | 2013-08-08 00:17:41 +0000 | [diff] [blame] | 85 | void AddClangCLArgs(const llvm::opt::ArgList &Args, |
| 86 | llvm::opt::ArgStringList &CmdArgs) const; |
| 87 | |
Hans Wennborg | 1da044a | 2014-06-26 19:59:02 +0000 | [diff] [blame] | 88 | visualstudio::Compile *getCLFallback() const; |
| 89 | |
| 90 | mutable std::unique_ptr<visualstudio::Compile> CLFallback; |
| 91 | |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 92 | public: |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 93 | Clang(const ToolChain &TC) : Tool("clang", "clang frontend", TC, RF_Full) {} |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 94 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 95 | bool hasGoodDiagnostics() const override { return true; } |
| 96 | bool hasIntegratedAssembler() const override { return true; } |
| 97 | bool hasIntegratedCPP() const override { return true; } |
Bob Wilson | 23a55f1 | 2014-12-21 07:00:00 +0000 | [diff] [blame] | 98 | bool canEmitIR() const override { return true; } |
Daniel Dunbar | 1a093d2 | 2009-03-18 06:00:36 +0000 | [diff] [blame] | 99 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 100 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 101 | const InputInfo &Output, const InputInfoList &Inputs, |
| 102 | const llvm::opt::ArgList &TCArgs, |
| 103 | const char *LinkingOutput) const override; |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 104 | }; |
| 105 | |
Daniel Dunbar | 4f5e79c | 2010-05-20 21:30:13 +0000 | [diff] [blame] | 106 | /// \brief Clang integrated assembler tool. |
| 107 | class LLVM_LIBRARY_VISIBILITY ClangAs : public Tool { |
| 108 | public: |
Daniel Dunbar | 1cb532c | 2010-05-22 00:37:18 +0000 | [diff] [blame] | 109 | ClangAs(const ToolChain &TC) : Tool("clang::as", |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 110 | "clang integrated assembler", TC, |
| 111 | RF_Full) {} |
Daniel Sanders | 7f933f4 | 2015-01-30 17:35:23 +0000 | [diff] [blame] | 112 | void AddMIPSTargetArgs(const llvm::opt::ArgList &Args, |
| 113 | llvm::opt::ArgStringList &CmdArgs) const; |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 114 | bool hasGoodDiagnostics() const override { return true; } |
| 115 | bool hasIntegratedAssembler() const override { return false; } |
| 116 | bool hasIntegratedCPP() const override { return false; } |
Daniel Dunbar | 4f5e79c | 2010-05-20 21:30:13 +0000 | [diff] [blame] | 117 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 118 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 119 | const InputInfo &Output, const InputInfoList &Inputs, |
| 120 | const llvm::opt::ArgList &TCArgs, |
| 121 | const char *LinkingOutput) const override; |
Daniel Dunbar | 4f5e79c | 2010-05-20 21:30:13 +0000 | [diff] [blame] | 122 | }; |
| 123 | |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 124 | /// \brief Base class for all GNU tools that provide the same behavior when |
| 125 | /// it comes to response files support |
| 126 | class GnuTool : public Tool { |
| 127 | virtual void anchor(); |
| 128 | |
| 129 | public: |
| 130 | GnuTool(const char *Name, const char *ShortName, const ToolChain &TC) |
| 131 | : Tool(Name, ShortName, TC, RF_Full, llvm::sys::WEM_CurrentCodePage) {} |
| 132 | }; |
| 133 | |
Daniel Dunbar | 82116f8 | 2009-03-17 22:45:24 +0000 | [diff] [blame] | 134 | /// gcc - Generic GCC tool implementations. |
| 135 | namespace gcc { |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 136 | class LLVM_LIBRARY_VISIBILITY Common : public GnuTool { |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 137 | public: |
Daniel Dunbar | 1cb532c | 2010-05-22 00:37:18 +0000 | [diff] [blame] | 138 | Common(const char *Name, const char *ShortName, |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 139 | const ToolChain &TC) : GnuTool(Name, ShortName, TC) {} |
Daniel Dunbar | a3246a0 | 2009-03-18 08:07:30 +0000 | [diff] [blame] | 140 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 141 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 142 | const InputInfo &Output, |
| 143 | const InputInfoList &Inputs, |
| 144 | const llvm::opt::ArgList &TCArgs, |
| 145 | const char *LinkingOutput) const override; |
Daniel Dunbar | a3246a0 | 2009-03-18 08:07:30 +0000 | [diff] [blame] | 146 | |
| 147 | /// RenderExtraToolArgs - Render any arguments necessary to force |
| 148 | /// the particular tool mode. |
Reid Kleckner | 724c21c | 2013-06-17 13:59:19 +0000 | [diff] [blame] | 149 | virtual void |
| 150 | RenderExtraToolArgs(const JobAction &JA, |
| 151 | llvm::opt::ArgStringList &CmdArgs) const = 0; |
Daniel Dunbar | a3246a0 | 2009-03-18 08:07:30 +0000 | [diff] [blame] | 152 | }; |
| 153 | |
Duncan Sands | af260b9 | 2010-05-11 20:16:05 +0000 | [diff] [blame] | 154 | class LLVM_LIBRARY_VISIBILITY Preprocess : public Common { |
Daniel Dunbar | a3246a0 | 2009-03-18 08:07:30 +0000 | [diff] [blame] | 155 | public: |
Daniel Dunbar | 1cb532c | 2010-05-22 00:37:18 +0000 | [diff] [blame] | 156 | Preprocess(const ToolChain &TC) : Common("gcc::Preprocess", |
| 157 | "gcc preprocessor", TC) {} |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 158 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 159 | bool hasGoodDiagnostics() const override { return true; } |
| 160 | bool hasIntegratedCPP() const override { return false; } |
Daniel Dunbar | 1a093d2 | 2009-03-18 06:00:36 +0000 | [diff] [blame] | 161 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 162 | void RenderExtraToolArgs(const JobAction &JA, |
| 163 | llvm::opt::ArgStringList &CmdArgs) const override; |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 164 | }; |
| 165 | |
Duncan Sands | af260b9 | 2010-05-11 20:16:05 +0000 | [diff] [blame] | 166 | class LLVM_LIBRARY_VISIBILITY Compile : public Common { |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 167 | public: |
Daniel Dunbar | 1cb532c | 2010-05-22 00:37:18 +0000 | [diff] [blame] | 168 | Compile(const ToolChain &TC) : Common("gcc::Compile", |
| 169 | "gcc frontend", TC) {} |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 170 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 171 | bool hasGoodDiagnostics() const override { return true; } |
| 172 | bool hasIntegratedCPP() const override { return true; } |
Daniel Dunbar | 1a093d2 | 2009-03-18 06:00:36 +0000 | [diff] [blame] | 173 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 174 | void RenderExtraToolArgs(const JobAction &JA, |
| 175 | llvm::opt::ArgStringList &CmdArgs) const override; |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 176 | }; |
| 177 | |
Duncan Sands | af260b9 | 2010-05-11 20:16:05 +0000 | [diff] [blame] | 178 | class LLVM_LIBRARY_VISIBILITY Link : public Common { |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 179 | public: |
Daniel Dunbar | 1cb532c | 2010-05-22 00:37:18 +0000 | [diff] [blame] | 180 | Link(const ToolChain &TC) : Common("gcc::Link", |
| 181 | "linker (via gcc)", TC) {} |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 182 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 183 | bool hasIntegratedCPP() const override { return false; } |
| 184 | bool isLinkJob() const override { return true; } |
Daniel Dunbar | 1a093d2 | 2009-03-18 06:00:36 +0000 | [diff] [blame] | 185 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 186 | void RenderExtraToolArgs(const JobAction &JA, |
| 187 | llvm::opt::ArgStringList &CmdArgs) const override; |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 188 | }; |
Daniel Dunbar | 82116f8 | 2009-03-17 22:45:24 +0000 | [diff] [blame] | 189 | } // end namespace gcc |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 190 | |
Tony Linthicum | 76329bf | 2011-12-12 21:14:55 +0000 | [diff] [blame] | 191 | namespace hexagon { |
| 192 | // For Hexagon, we do not need to instantiate tools for PreProcess, PreCompile and Compile. |
| 193 | // We simply use "clang -cc1" for those actions. |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 194 | class LLVM_LIBRARY_VISIBILITY Assemble : public GnuTool { |
Tony Linthicum | 76329bf | 2011-12-12 21:14:55 +0000 | [diff] [blame] | 195 | public: |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 196 | Assemble(const ToolChain &TC) : GnuTool("hexagon::Assemble", |
Tony Linthicum | 76329bf | 2011-12-12 21:14:55 +0000 | [diff] [blame] | 197 | "hexagon-as", TC) {} |
| 198 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 199 | bool hasIntegratedCPP() const override { return false; } |
Tony Linthicum | 76329bf | 2011-12-12 21:14:55 +0000 | [diff] [blame] | 200 | |
Craig Topper | f85c6ce | 2014-03-14 06:06:19 +0000 | [diff] [blame] | 201 | void RenderExtraToolArgs(const JobAction &JA, |
| 202 | llvm::opt::ArgStringList &CmdArgs) const; |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 203 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 204 | const InputInfo &Output, const InputInfoList &Inputs, |
| 205 | const llvm::opt::ArgList &TCArgs, |
| 206 | const char *LinkingOutput) const override; |
Tony Linthicum | 76329bf | 2011-12-12 21:14:55 +0000 | [diff] [blame] | 207 | }; |
| 208 | |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 209 | class LLVM_LIBRARY_VISIBILITY Link : public GnuTool { |
Tony Linthicum | 76329bf | 2011-12-12 21:14:55 +0000 | [diff] [blame] | 210 | public: |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 211 | Link(const ToolChain &TC) : GnuTool("hexagon::Link", |
Tony Linthicum | 76329bf | 2011-12-12 21:14:55 +0000 | [diff] [blame] | 212 | "hexagon-ld", TC) {} |
| 213 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 214 | bool hasIntegratedCPP() const override { return false; } |
| 215 | bool isLinkJob() const override { return true; } |
Tony Linthicum | 76329bf | 2011-12-12 21:14:55 +0000 | [diff] [blame] | 216 | |
| 217 | virtual void RenderExtraToolArgs(const JobAction &JA, |
Reid Kleckner | 724c21c | 2013-06-17 13:59:19 +0000 | [diff] [blame] | 218 | llvm::opt::ArgStringList &CmdArgs) const; |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 219 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 220 | const InputInfo &Output, const InputInfoList &Inputs, |
| 221 | const llvm::opt::ArgList &TCArgs, |
| 222 | const char *LinkingOutput) const override; |
Tony Linthicum | 76329bf | 2011-12-12 21:14:55 +0000 | [diff] [blame] | 223 | }; |
| 224 | } // end namespace hexagon. |
| 225 | |
Bernard Ogden | 3156176 | 2013-12-12 13:27:11 +0000 | [diff] [blame] | 226 | namespace arm { |
Gabor Ballabas | 208826c | 2015-06-04 17:56:32 +0000 | [diff] [blame^] | 227 | std::string getARMTargetCPU(const llvm::opt::ArgList &Args, |
| 228 | const llvm::Triple &Triple); |
Vladimir Sukharev | c6dab75 | 2015-05-14 08:25:18 +0000 | [diff] [blame] | 229 | const StringRef getARMArch(const llvm::opt::ArgList &Args, |
| 230 | const llvm::Triple &Triple); |
Bernard Ogden | 3156176 | 2013-12-12 13:27:11 +0000 | [diff] [blame] | 231 | const char* getARMCPUForMArch(const llvm::opt::ArgList &Args, |
| 232 | const llvm::Triple &Triple); |
Vladimir Sukharev | c6dab75 | 2015-05-14 08:25:18 +0000 | [diff] [blame] | 233 | const char* getLLVMArchSuffixForARM(StringRef CPU, StringRef Arch); |
Joerg Sonnenberger | 1689d3f | 2015-01-28 23:30:39 +0000 | [diff] [blame] | 234 | |
| 235 | void appendEBLinkFlags(const llvm::opt::ArgList &Args, ArgStringList &CmdArgs, const llvm::Triple &Triple); |
Bernard Ogden | 3156176 | 2013-12-12 13:27:11 +0000 | [diff] [blame] | 236 | } |
Tony Linthicum | 76329bf | 2011-12-12 21:14:55 +0000 | [diff] [blame] | 237 | |
Jonathan Roelofs | 2cea1be | 2014-02-12 03:21:20 +0000 | [diff] [blame] | 238 | namespace mips { |
Petar Jovanovic | 1dbc317 | 2015-04-14 12:49:08 +0000 | [diff] [blame] | 239 | typedef enum { |
| 240 | NanLegacy = 1, |
| 241 | Nan2008 = 2 |
| 242 | } NanEncoding; |
| 243 | NanEncoding getSupportedNanEncoding(StringRef &CPU); |
Simon Atanasyan | 7018e1d | 2014-07-16 12:29:22 +0000 | [diff] [blame] | 244 | void getMipsCPUAndABI(const llvm::opt::ArgList &Args, |
| 245 | const llvm::Triple &Triple, StringRef &CPUName, |
| 246 | StringRef &ABIName); |
Jonathan Roelofs | 2cea1be | 2014-02-12 03:21:20 +0000 | [diff] [blame] | 247 | bool hasMipsAbiArg(const llvm::opt::ArgList &Args, const char *Value); |
Simon Atanasyan | d95c67d | 2014-08-13 14:34:14 +0000 | [diff] [blame] | 248 | bool isUCLibc(const llvm::opt::ArgList &Args); |
Daniel Sanders | 2bf1366 | 2014-07-10 14:40:57 +0000 | [diff] [blame] | 249 | bool isNaN2008(const llvm::opt::ArgList &Args, const llvm::Triple &Triple); |
Daniel Sanders | 379d44b | 2014-07-16 11:52:23 +0000 | [diff] [blame] | 250 | bool isFPXXDefault(const llvm::Triple &Triple, StringRef CPUName, |
| 251 | StringRef ABIName); |
Jonathan Roelofs | 2cea1be | 2014-02-12 03:21:20 +0000 | [diff] [blame] | 252 | } |
| 253 | |
Ulrich Weigand | 8afad61 | 2014-07-28 13:17:52 +0000 | [diff] [blame] | 254 | namespace ppc { |
| 255 | bool hasPPCAbiArg(const llvm::opt::ArgList &Args, const char *Value); |
| 256 | } |
| 257 | |
Ed Schouten | 3c3e58c | 2015-03-26 11:13:44 +0000 | [diff] [blame] | 258 | /// cloudabi -- Directly call GNU Binutils linker |
| 259 | namespace cloudabi { |
| 260 | class LLVM_LIBRARY_VISIBILITY Link : public GnuTool { |
| 261 | public: |
| 262 | Link(const ToolChain &TC) : GnuTool("cloudabi::Link", "linker", TC) {} |
| 263 | |
| 264 | bool hasIntegratedCPP() const override { return false; } |
| 265 | bool isLinkJob() const override { return true; } |
| 266 | |
| 267 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 268 | const InputInfo &Output, const InputInfoList &Inputs, |
| 269 | const llvm::opt::ArgList &TCArgs, |
| 270 | const char *LinkingOutput) const override; |
| 271 | }; |
| 272 | } // end namespace cloudabi |
| 273 | |
Daniel Dunbar | 64ed5e3 | 2009-03-20 00:52:38 +0000 | [diff] [blame] | 274 | namespace darwin { |
Tim Northover | 157d911 | 2014-01-16 08:48:16 +0000 | [diff] [blame] | 275 | llvm::Triple::ArchType getArchTypeForMachOArchName(StringRef Str); |
| 276 | void setTripleTypeForMachOArchName(llvm::Triple &T, StringRef Str); |
Rafael Espindola | dcbf698 | 2012-10-31 18:51:07 +0000 | [diff] [blame] | 277 | |
Tim Northover | 157d911 | 2014-01-16 08:48:16 +0000 | [diff] [blame] | 278 | class LLVM_LIBRARY_VISIBILITY MachOTool : public Tool { |
David Blaikie | 68e081d | 2011-12-20 02:48:34 +0000 | [diff] [blame] | 279 | virtual void anchor(); |
Daniel Dunbar | e9ded43 | 2009-09-09 18:36:20 +0000 | [diff] [blame] | 280 | protected: |
Tim Northover | 157d911 | 2014-01-16 08:48:16 +0000 | [diff] [blame] | 281 | void AddMachOArch(const llvm::opt::ArgList &Args, |
Reid Kleckner | 724c21c | 2013-06-17 13:59:19 +0000 | [diff] [blame] | 282 | llvm::opt::ArgStringList &CmdArgs) const; |
Daniel Dunbar | e9ded43 | 2009-09-09 18:36:20 +0000 | [diff] [blame] | 283 | |
Tim Northover | 157d911 | 2014-01-16 08:48:16 +0000 | [diff] [blame] | 284 | const toolchains::MachO &getMachOToolChain() const { |
| 285 | return reinterpret_cast<const toolchains::MachO&>(getToolChain()); |
Daniel Dunbar | e9ded43 | 2009-09-09 18:36:20 +0000 | [diff] [blame] | 286 | } |
| 287 | |
| 288 | public: |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 289 | MachOTool( |
| 290 | const char *Name, const char *ShortName, const ToolChain &TC, |
| 291 | ResponseFileSupport ResponseSupport = RF_None, |
| 292 | llvm::sys::WindowsEncodingMethod ResponseEncoding = llvm::sys::WEM_UTF8, |
| 293 | const char *ResponseFlag = "@") |
| 294 | : Tool(Name, ShortName, TC, ResponseSupport, ResponseEncoding, |
| 295 | ResponseFlag) {} |
Daniel Dunbar | e9ded43 | 2009-09-09 18:36:20 +0000 | [diff] [blame] | 296 | }; |
| 297 | |
Tim Northover | 157d911 | 2014-01-16 08:48:16 +0000 | [diff] [blame] | 298 | class LLVM_LIBRARY_VISIBILITY Assemble : public MachOTool { |
Daniel Dunbar | be22084 | 2009-03-20 16:06:39 +0000 | [diff] [blame] | 299 | public: |
Tim Northover | 157d911 | 2014-01-16 08:48:16 +0000 | [diff] [blame] | 300 | Assemble(const ToolChain &TC) : MachOTool("darwin::Assemble", |
| 301 | "assembler", TC) {} |
Daniel Dunbar | be22084 | 2009-03-20 16:06:39 +0000 | [diff] [blame] | 302 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 303 | bool hasIntegratedCPP() const override { return false; } |
Daniel Dunbar | be22084 | 2009-03-20 16:06:39 +0000 | [diff] [blame] | 304 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 305 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 306 | const InputInfo &Output, const InputInfoList &Inputs, |
| 307 | const llvm::opt::ArgList &TCArgs, |
| 308 | const char *LinkingOutput) const override; |
Daniel Dunbar | be22084 | 2009-03-20 16:06:39 +0000 | [diff] [blame] | 309 | }; |
| 310 | |
Tim Northover | 157d911 | 2014-01-16 08:48:16 +0000 | [diff] [blame] | 311 | class LLVM_LIBRARY_VISIBILITY Link : public MachOTool { |
Bill Wendling | 3b2000f | 2012-10-02 18:02:50 +0000 | [diff] [blame] | 312 | bool NeedsTempPath(const InputInfoList &Inputs) const; |
Reid Kleckner | 724c21c | 2013-06-17 13:59:19 +0000 | [diff] [blame] | 313 | void AddLinkArgs(Compilation &C, const llvm::opt::ArgList &Args, |
| 314 | llvm::opt::ArgStringList &CmdArgs, |
| 315 | const InputInfoList &Inputs) const; |
Daniel Dunbar | c196421 | 2009-03-26 16:23:12 +0000 | [diff] [blame] | 316 | |
Daniel Dunbar | c196421 | 2009-03-26 16:23:12 +0000 | [diff] [blame] | 317 | public: |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 318 | Link(const ToolChain &TC) : MachOTool("darwin::Link", "linker", TC, |
| 319 | RF_FileList, llvm::sys::WEM_UTF8, |
| 320 | "-filelist") {} |
Daniel Dunbar | c196421 | 2009-03-26 16:23:12 +0000 | [diff] [blame] | 321 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 322 | bool hasIntegratedCPP() const override { return false; } |
| 323 | bool isLinkJob() const override { return true; } |
Daniel Dunbar | c196421 | 2009-03-26 16:23:12 +0000 | [diff] [blame] | 324 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 325 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 326 | const InputInfo &Output, const InputInfoList &Inputs, |
| 327 | const llvm::opt::ArgList &TCArgs, |
| 328 | const char *LinkingOutput) const override; |
Daniel Dunbar | c196421 | 2009-03-26 16:23:12 +0000 | [diff] [blame] | 329 | }; |
| 330 | |
Tim Northover | 157d911 | 2014-01-16 08:48:16 +0000 | [diff] [blame] | 331 | class LLVM_LIBRARY_VISIBILITY Lipo : public MachOTool { |
Daniel Dunbar | 64ed5e3 | 2009-03-20 00:52:38 +0000 | [diff] [blame] | 332 | public: |
Tim Northover | 157d911 | 2014-01-16 08:48:16 +0000 | [diff] [blame] | 333 | Lipo(const ToolChain &TC) : MachOTool("darwin::Lipo", "lipo", TC) {} |
Daniel Dunbar | 64ed5e3 | 2009-03-20 00:52:38 +0000 | [diff] [blame] | 334 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 335 | bool hasIntegratedCPP() const override { return false; } |
Daniel Dunbar | 64ed5e3 | 2009-03-20 00:52:38 +0000 | [diff] [blame] | 336 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 337 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 338 | const InputInfo &Output, const InputInfoList &Inputs, |
| 339 | const llvm::opt::ArgList &TCArgs, |
| 340 | const char *LinkingOutput) const override; |
Daniel Dunbar | 64ed5e3 | 2009-03-20 00:52:38 +0000 | [diff] [blame] | 341 | }; |
Daniel Dunbar | 8829962 | 2010-06-04 18:28:36 +0000 | [diff] [blame] | 342 | |
Tim Northover | 157d911 | 2014-01-16 08:48:16 +0000 | [diff] [blame] | 343 | class LLVM_LIBRARY_VISIBILITY Dsymutil : public MachOTool { |
Daniel Dunbar | 8829962 | 2010-06-04 18:28:36 +0000 | [diff] [blame] | 344 | public: |
Tim Northover | 157d911 | 2014-01-16 08:48:16 +0000 | [diff] [blame] | 345 | Dsymutil(const ToolChain &TC) : MachOTool("darwin::Dsymutil", |
| 346 | "dsymutil", TC) {} |
Daniel Dunbar | 8829962 | 2010-06-04 18:28:36 +0000 | [diff] [blame] | 347 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 348 | bool hasIntegratedCPP() const override { return false; } |
| 349 | bool isDsymutilJob() const override { return true; } |
Daniel Dunbar | 8829962 | 2010-06-04 18:28:36 +0000 | [diff] [blame] | 350 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 351 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 352 | const InputInfo &Output, |
| 353 | const InputInfoList &Inputs, |
| 354 | const llvm::opt::ArgList &TCArgs, |
| 355 | const char *LinkingOutput) const override; |
Daniel Dunbar | 8829962 | 2010-06-04 18:28:36 +0000 | [diff] [blame] | 356 | }; |
Eric Christopher | 551ef45 | 2011-08-23 17:56:55 +0000 | [diff] [blame] | 357 | |
Tim Northover | 157d911 | 2014-01-16 08:48:16 +0000 | [diff] [blame] | 358 | class LLVM_LIBRARY_VISIBILITY VerifyDebug : public MachOTool { |
Eric Christopher | 551ef45 | 2011-08-23 17:56:55 +0000 | [diff] [blame] | 359 | public: |
Tim Northover | 157d911 | 2014-01-16 08:48:16 +0000 | [diff] [blame] | 360 | VerifyDebug(const ToolChain &TC) : MachOTool("darwin::VerifyDebug", |
| 361 | "dwarfdump", TC) {} |
Eric Christopher | 551ef45 | 2011-08-23 17:56:55 +0000 | [diff] [blame] | 362 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 363 | bool hasIntegratedCPP() const override { return false; } |
Eric Christopher | 551ef45 | 2011-08-23 17:56:55 +0000 | [diff] [blame] | 364 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 365 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 366 | const InputInfo &Output, const InputInfoList &Inputs, |
| 367 | const llvm::opt::ArgList &TCArgs, |
| 368 | const char *LinkingOutput) const override; |
Eric Christopher | 551ef45 | 2011-08-23 17:56:55 +0000 | [diff] [blame] | 369 | }; |
| 370 | |
Daniel Dunbar | 64ed5e3 | 2009-03-20 00:52:38 +0000 | [diff] [blame] | 371 | } |
| 372 | |
Daniel Dunbar | 10de9e6 | 2009-06-29 20:52:51 +0000 | [diff] [blame] | 373 | /// openbsd -- Directly call GNU Binutils assembler and linker |
| 374 | namespace openbsd { |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 375 | class LLVM_LIBRARY_VISIBILITY Assemble : public GnuTool { |
Daniel Dunbar | 10de9e6 | 2009-06-29 20:52:51 +0000 | [diff] [blame] | 376 | public: |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 377 | Assemble(const ToolChain &TC) : GnuTool("openbsd::Assemble", "assembler", |
Daniel Dunbar | 1cb532c | 2010-05-22 00:37:18 +0000 | [diff] [blame] | 378 | TC) {} |
Daniel Dunbar | 10de9e6 | 2009-06-29 20:52:51 +0000 | [diff] [blame] | 379 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 380 | bool hasIntegratedCPP() const override { return false; } |
Daniel Dunbar | 10de9e6 | 2009-06-29 20:52:51 +0000 | [diff] [blame] | 381 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 382 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 383 | const InputInfo &Output, |
| 384 | const InputInfoList &Inputs, |
| 385 | const llvm::opt::ArgList &TCArgs, |
| 386 | const char *LinkingOutput) const override; |
Daniel Dunbar | 10de9e6 | 2009-06-29 20:52:51 +0000 | [diff] [blame] | 387 | }; |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 388 | class LLVM_LIBRARY_VISIBILITY Link : public GnuTool { |
Daniel Dunbar | 10de9e6 | 2009-06-29 20:52:51 +0000 | [diff] [blame] | 389 | public: |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 390 | Link(const ToolChain &TC) : GnuTool("openbsd::Link", "linker", TC) {} |
Daniel Dunbar | 10de9e6 | 2009-06-29 20:52:51 +0000 | [diff] [blame] | 391 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 392 | bool hasIntegratedCPP() const override { return false; } |
| 393 | bool isLinkJob() const override { return true; } |
Daniel Dunbar | 10de9e6 | 2009-06-29 20:52:51 +0000 | [diff] [blame] | 394 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 395 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 396 | const InputInfo &Output, const InputInfoList &Inputs, |
| 397 | const llvm::opt::ArgList &TCArgs, |
| 398 | const char *LinkingOutput) const override; |
Daniel Dunbar | 10de9e6 | 2009-06-29 20:52:51 +0000 | [diff] [blame] | 399 | }; |
Edward O'Callaghan | 856e4ff | 2009-08-22 01:06:46 +0000 | [diff] [blame] | 400 | } // end namespace openbsd |
Daniel Dunbar | 10de9e6 | 2009-06-29 20:52:51 +0000 | [diff] [blame] | 401 | |
Eli Friedman | 9fa2885 | 2012-08-08 23:57:20 +0000 | [diff] [blame] | 402 | /// bitrig -- Directly call GNU Binutils assembler and linker |
| 403 | namespace bitrig { |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 404 | class LLVM_LIBRARY_VISIBILITY Assemble : public GnuTool { |
Eli Friedman | 9fa2885 | 2012-08-08 23:57:20 +0000 | [diff] [blame] | 405 | public: |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 406 | Assemble(const ToolChain &TC) : GnuTool("bitrig::Assemble", "assembler", |
Eli Friedman | 9fa2885 | 2012-08-08 23:57:20 +0000 | [diff] [blame] | 407 | TC) {} |
| 408 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 409 | bool hasIntegratedCPP() const override { return false; } |
Eli Friedman | 9fa2885 | 2012-08-08 23:57:20 +0000 | [diff] [blame] | 410 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 411 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 412 | const InputInfo &Output, const InputInfoList &Inputs, |
| 413 | const llvm::opt::ArgList &TCArgs, |
| 414 | const char *LinkingOutput) const override; |
Eli Friedman | 9fa2885 | 2012-08-08 23:57:20 +0000 | [diff] [blame] | 415 | }; |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 416 | class LLVM_LIBRARY_VISIBILITY Link : public GnuTool { |
Eli Friedman | 9fa2885 | 2012-08-08 23:57:20 +0000 | [diff] [blame] | 417 | public: |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 418 | Link(const ToolChain &TC) : GnuTool("bitrig::Link", "linker", TC) {} |
Eli Friedman | 9fa2885 | 2012-08-08 23:57:20 +0000 | [diff] [blame] | 419 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 420 | bool hasIntegratedCPP() const override { return false; } |
| 421 | bool isLinkJob() const override { return true; } |
Eli Friedman | 9fa2885 | 2012-08-08 23:57:20 +0000 | [diff] [blame] | 422 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 423 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 424 | const InputInfo &Output, const InputInfoList &Inputs, |
| 425 | const llvm::opt::ArgList &TCArgs, |
| 426 | const char *LinkingOutput) const override; |
Eli Friedman | 9fa2885 | 2012-08-08 23:57:20 +0000 | [diff] [blame] | 427 | }; |
| 428 | } // end namespace bitrig |
| 429 | |
Daniel Dunbar | 8eb473c | 2009-03-31 17:45:15 +0000 | [diff] [blame] | 430 | /// freebsd -- Directly call GNU Binutils assembler and linker |
| 431 | namespace freebsd { |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 432 | class LLVM_LIBRARY_VISIBILITY Assemble : public GnuTool { |
Daniel Dunbar | 8eb473c | 2009-03-31 17:45:15 +0000 | [diff] [blame] | 433 | public: |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 434 | Assemble(const ToolChain &TC) : GnuTool("freebsd::Assemble", "assembler", |
Daniel Dunbar | 1cb532c | 2010-05-22 00:37:18 +0000 | [diff] [blame] | 435 | TC) {} |
Daniel Dunbar | 8eb473c | 2009-03-31 17:45:15 +0000 | [diff] [blame] | 436 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 437 | bool hasIntegratedCPP() const override { return false; } |
Daniel Dunbar | 8eb473c | 2009-03-31 17:45:15 +0000 | [diff] [blame] | 438 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 439 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 440 | const InputInfo &Output, const InputInfoList &Inputs, |
| 441 | const llvm::opt::ArgList &TCArgs, |
| 442 | const char *LinkingOutput) const override; |
Daniel Dunbar | 8eb473c | 2009-03-31 17:45:15 +0000 | [diff] [blame] | 443 | }; |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 444 | class LLVM_LIBRARY_VISIBILITY Link : public GnuTool { |
Daniel Dunbar | d854c8d | 2009-04-01 19:36:32 +0000 | [diff] [blame] | 445 | public: |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 446 | Link(const ToolChain &TC) : GnuTool("freebsd::Link", "linker", TC) {} |
Daniel Dunbar | d854c8d | 2009-04-01 19:36:32 +0000 | [diff] [blame] | 447 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 448 | bool hasIntegratedCPP() const override { return false; } |
| 449 | bool isLinkJob() const override { return true; } |
Daniel Dunbar | d854c8d | 2009-04-01 19:36:32 +0000 | [diff] [blame] | 450 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 451 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 452 | const InputInfo &Output, const InputInfoList &Inputs, |
| 453 | const llvm::opt::ArgList &TCArgs, |
| 454 | const char *LinkingOutput) const override; |
Daniel Dunbar | d854c8d | 2009-04-01 19:36:32 +0000 | [diff] [blame] | 455 | }; |
Edward O'Callaghan | 856e4ff | 2009-08-22 01:06:46 +0000 | [diff] [blame] | 456 | } // end namespace freebsd |
| 457 | |
Benjamin Kramer | 24f1d3e | 2011-02-02 18:59:27 +0000 | [diff] [blame] | 458 | /// netbsd -- Directly call GNU Binutils assembler and linker |
| 459 | namespace netbsd { |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 460 | class LLVM_LIBRARY_VISIBILITY Assemble : public GnuTool { |
Joerg Sonnenberger | 637603a | 2011-05-16 13:35:02 +0000 | [diff] [blame] | 461 | |
Benjamin Kramer | 24f1d3e | 2011-02-02 18:59:27 +0000 | [diff] [blame] | 462 | public: |
Joerg Sonnenberger | d64c60e | 2012-01-26 22:27:52 +0000 | [diff] [blame] | 463 | Assemble(const ToolChain &TC) |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 464 | : GnuTool("netbsd::Assemble", "assembler", TC) {} |
Benjamin Kramer | 24f1d3e | 2011-02-02 18:59:27 +0000 | [diff] [blame] | 465 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 466 | bool hasIntegratedCPP() const override { return false; } |
Benjamin Kramer | 24f1d3e | 2011-02-02 18:59:27 +0000 | [diff] [blame] | 467 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 468 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 469 | const InputInfo &Output, const InputInfoList &Inputs, |
| 470 | const llvm::opt::ArgList &TCArgs, |
| 471 | const char *LinkingOutput) const override; |
Benjamin Kramer | 24f1d3e | 2011-02-02 18:59:27 +0000 | [diff] [blame] | 472 | }; |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 473 | class LLVM_LIBRARY_VISIBILITY Link : public GnuTool { |
Joerg Sonnenberger | 637603a | 2011-05-16 13:35:02 +0000 | [diff] [blame] | 474 | |
Benjamin Kramer | 24f1d3e | 2011-02-02 18:59:27 +0000 | [diff] [blame] | 475 | public: |
Joerg Sonnenberger | d64c60e | 2012-01-26 22:27:52 +0000 | [diff] [blame] | 476 | Link(const ToolChain &TC) |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 477 | : GnuTool("netbsd::Link", "linker", TC) {} |
Benjamin Kramer | 24f1d3e | 2011-02-02 18:59:27 +0000 | [diff] [blame] | 478 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 479 | bool hasIntegratedCPP() const override { return false; } |
| 480 | bool isLinkJob() const override { return true; } |
Benjamin Kramer | 24f1d3e | 2011-02-02 18:59:27 +0000 | [diff] [blame] | 481 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 482 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 483 | const InputInfo &Output, const InputInfoList &Inputs, |
| 484 | const llvm::opt::ArgList &TCArgs, |
| 485 | const char *LinkingOutput) const override; |
Benjamin Kramer | 24f1d3e | 2011-02-02 18:59:27 +0000 | [diff] [blame] | 486 | }; |
| 487 | } // end namespace netbsd |
| 488 | |
Thomas Schwinge | 4e55526 | 2013-03-28 19:04:25 +0000 | [diff] [blame] | 489 | /// Directly call GNU Binutils' assembler and linker. |
| 490 | namespace gnutools { |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 491 | class LLVM_LIBRARY_VISIBILITY Assemble : public GnuTool { |
Rafael Espindola | 92b0093 | 2010-08-10 00:25:48 +0000 | [diff] [blame] | 492 | public: |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 493 | Assemble(const ToolChain &TC) : GnuTool("GNU::Assemble", "assembler", TC) {} |
Rafael Espindola | 92b0093 | 2010-08-10 00:25:48 +0000 | [diff] [blame] | 494 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 495 | bool hasIntegratedCPP() const override { return false; } |
Rafael Espindola | 92b0093 | 2010-08-10 00:25:48 +0000 | [diff] [blame] | 496 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 497 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 498 | const InputInfo &Output, |
| 499 | const InputInfoList &Inputs, |
| 500 | const llvm::opt::ArgList &TCArgs, |
| 501 | const char *LinkingOutput) const override; |
Rafael Espindola | 92b0093 | 2010-08-10 00:25:48 +0000 | [diff] [blame] | 502 | }; |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 503 | class LLVM_LIBRARY_VISIBILITY Link : public GnuTool { |
Rafael Espindola | c8f008f | 2010-11-07 20:14:31 +0000 | [diff] [blame] | 504 | public: |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 505 | Link(const ToolChain &TC) : GnuTool("GNU::Link", "linker", TC) {} |
Rafael Espindola | c8f008f | 2010-11-07 20:14:31 +0000 | [diff] [blame] | 506 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 507 | bool hasIntegratedCPP() const override { return false; } |
| 508 | bool isLinkJob() const override { return true; } |
Rafael Espindola | c8f008f | 2010-11-07 20:14:31 +0000 | [diff] [blame] | 509 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 510 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 511 | const InputInfo &Output, |
| 512 | const InputInfoList &Inputs, |
| 513 | const llvm::opt::ArgList &TCArgs, |
| 514 | const char *LinkingOutput) const override; |
Rafael Espindola | c8f008f | 2010-11-07 20:14:31 +0000 | [diff] [blame] | 515 | }; |
Rafael Espindola | 92b0093 | 2010-08-10 00:25:48 +0000 | [diff] [blame] | 516 | } |
Derek Schuff | 6ab52fa | 2015-03-30 20:31:33 +0000 | [diff] [blame] | 517 | |
| 518 | namespace nacltools { |
| 519 | class LLVM_LIBRARY_VISIBILITY AssembleARM : public gnutools::Assemble { |
| 520 | public: |
| 521 | AssembleARM(const ToolChain &TC) : gnutools::Assemble(TC) {} |
| 522 | |
| 523 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 524 | const InputInfo &Output, |
| 525 | const InputInfoList &Inputs, |
| 526 | const llvm::opt::ArgList &TCArgs, |
| 527 | const char *LinkingOutput) const override; |
| 528 | }; |
| 529 | class LLVM_LIBRARY_VISIBILITY Link : public Tool { |
| 530 | public: |
| 531 | Link(const ToolChain &TC) : Tool("NaCl::Link", "linker", TC) {} |
| 532 | |
| 533 | bool hasIntegratedCPP() const override { return false; } |
| 534 | bool isLinkJob() const override { return true; } |
| 535 | |
| 536 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 537 | const InputInfo &Output, |
| 538 | const InputInfoList &Inputs, |
| 539 | const llvm::opt::ArgList &TCArgs, |
| 540 | const char *LinkingOutput) const override; |
| 541 | }; |
| 542 | } |
| 543 | |
Chris Lattner | 3e2ee14 | 2010-07-07 16:01:42 +0000 | [diff] [blame] | 544 | /// minix -- Directly call GNU Binutils assembler and linker |
| 545 | namespace minix { |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 546 | class LLVM_LIBRARY_VISIBILITY Assemble : public GnuTool { |
Chris Lattner | 3e2ee14 | 2010-07-07 16:01:42 +0000 | [diff] [blame] | 547 | public: |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 548 | Assemble(const ToolChain &TC) : GnuTool("minix::Assemble", "assembler", |
Chris Lattner | 3e2ee14 | 2010-07-07 16:01:42 +0000 | [diff] [blame] | 549 | TC) {} |
| 550 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 551 | bool hasIntegratedCPP() const override { return false; } |
Chris Lattner | 3e2ee14 | 2010-07-07 16:01:42 +0000 | [diff] [blame] | 552 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 553 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 554 | const InputInfo &Output, |
| 555 | const InputInfoList &Inputs, |
| 556 | const llvm::opt::ArgList &TCArgs, |
| 557 | const char *LinkingOutput) const override; |
Chris Lattner | 3e2ee14 | 2010-07-07 16:01:42 +0000 | [diff] [blame] | 558 | }; |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 559 | class LLVM_LIBRARY_VISIBILITY Link : public GnuTool { |
Chris Lattner | 3e2ee14 | 2010-07-07 16:01:42 +0000 | [diff] [blame] | 560 | public: |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 561 | Link(const ToolChain &TC) : GnuTool("minix::Link", "linker", TC) {} |
Chris Lattner | 3e2ee14 | 2010-07-07 16:01:42 +0000 | [diff] [blame] | 562 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 563 | bool hasIntegratedCPP() const override { return false; } |
| 564 | bool isLinkJob() const override { return true; } |
Chris Lattner | 3e2ee14 | 2010-07-07 16:01:42 +0000 | [diff] [blame] | 565 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 566 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 567 | const InputInfo &Output, |
| 568 | const InputInfoList &Inputs, |
| 569 | const llvm::opt::ArgList &TCArgs, |
| 570 | const char *LinkingOutput) const override; |
Chris Lattner | 3e2ee14 | 2010-07-07 16:01:42 +0000 | [diff] [blame] | 571 | }; |
| 572 | } // end namespace minix |
| 573 | |
David Chisnall | f571cde | 2012-02-15 13:39:01 +0000 | [diff] [blame] | 574 | /// solaris -- Directly call Solaris assembler and linker |
| 575 | namespace solaris { |
| 576 | class LLVM_LIBRARY_VISIBILITY Assemble : public Tool { |
| 577 | public: |
| 578 | Assemble(const ToolChain &TC) : Tool("solaris::Assemble", "assembler", |
| 579 | TC) {} |
| 580 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 581 | bool hasIntegratedCPP() const override { return false; } |
David Chisnall | f571cde | 2012-02-15 13:39:01 +0000 | [diff] [blame] | 582 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 583 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 584 | const InputInfo &Output, const InputInfoList &Inputs, |
| 585 | const llvm::opt::ArgList &TCArgs, |
| 586 | const char *LinkingOutput) const override; |
David Chisnall | f571cde | 2012-02-15 13:39:01 +0000 | [diff] [blame] | 587 | }; |
| 588 | class LLVM_LIBRARY_VISIBILITY Link : public Tool { |
| 589 | public: |
| 590 | Link(const ToolChain &TC) : Tool("solaris::Link", "linker", TC) {} |
| 591 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 592 | bool hasIntegratedCPP() const override { return false; } |
| 593 | bool isLinkJob() const override { return true; } |
David Chisnall | f571cde | 2012-02-15 13:39:01 +0000 | [diff] [blame] | 594 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 595 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 596 | const InputInfo &Output, const InputInfoList &Inputs, |
| 597 | const llvm::opt::ArgList &TCArgs, |
| 598 | const char *LinkingOutput) const override; |
David Chisnall | f571cde | 2012-02-15 13:39:01 +0000 | [diff] [blame] | 599 | }; |
David Chisnall | a9ed5d7 | 2012-02-15 16:25:46 +0000 | [diff] [blame] | 600 | } // end namespace solaris |
David Chisnall | f571cde | 2012-02-15 13:39:01 +0000 | [diff] [blame] | 601 | |
Daniel Dunbar | cc91234 | 2009-05-02 18:28:39 +0000 | [diff] [blame] | 602 | /// dragonfly -- Directly call GNU Binutils assembler and linker |
| 603 | namespace dragonfly { |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 604 | class LLVM_LIBRARY_VISIBILITY Assemble : public GnuTool { |
Daniel Dunbar | cc91234 | 2009-05-02 18:28:39 +0000 | [diff] [blame] | 605 | public: |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 606 | Assemble(const ToolChain &TC) : GnuTool("dragonfly::Assemble", "assembler", |
Daniel Dunbar | 1cb532c | 2010-05-22 00:37:18 +0000 | [diff] [blame] | 607 | TC) {} |
Daniel Dunbar | cc91234 | 2009-05-02 18:28:39 +0000 | [diff] [blame] | 608 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 609 | bool hasIntegratedCPP() const override { return false; } |
Daniel Dunbar | cc91234 | 2009-05-02 18:28:39 +0000 | [diff] [blame] | 610 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 611 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 612 | const InputInfo &Output, const InputInfoList &Inputs, |
| 613 | const llvm::opt::ArgList &TCArgs, |
| 614 | const char *LinkingOutput) const override; |
Daniel Dunbar | cc91234 | 2009-05-02 18:28:39 +0000 | [diff] [blame] | 615 | }; |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 616 | class LLVM_LIBRARY_VISIBILITY Link : public GnuTool { |
Daniel Dunbar | cc91234 | 2009-05-02 18:28:39 +0000 | [diff] [blame] | 617 | public: |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 618 | Link(const ToolChain &TC) : GnuTool("dragonfly::Link", "linker", TC) {} |
Daniel Dunbar | cc91234 | 2009-05-02 18:28:39 +0000 | [diff] [blame] | 619 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 620 | bool hasIntegratedCPP() const override { return false; } |
| 621 | bool isLinkJob() const override { return true; } |
Daniel Dunbar | cc91234 | 2009-05-02 18:28:39 +0000 | [diff] [blame] | 622 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 623 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 624 | const InputInfo &Output, |
| 625 | const InputInfoList &Inputs, |
| 626 | const llvm::opt::ArgList &TCArgs, |
| 627 | const char *LinkingOutput) const override; |
Daniel Dunbar | cc91234 | 2009-05-02 18:28:39 +0000 | [diff] [blame] | 628 | }; |
Edward O'Callaghan | 856e4ff | 2009-08-22 01:06:46 +0000 | [diff] [blame] | 629 | } // end namespace dragonfly |
Daniel Dunbar | cc91234 | 2009-05-02 18:28:39 +0000 | [diff] [blame] | 630 | |
Hans Wennborg | 1da044a | 2014-06-26 19:59:02 +0000 | [diff] [blame] | 631 | /// Visual studio tools. |
Michael J. Spencer | b186bc3 | 2010-08-21 21:55:07 +0000 | [diff] [blame] | 632 | namespace visualstudio { |
Hans Wennborg | 87cfa71 | 2013-09-19 20:32:16 +0000 | [diff] [blame] | 633 | class LLVM_LIBRARY_VISIBILITY Link : public Tool { |
Michael J. Spencer | b186bc3 | 2010-08-21 21:55:07 +0000 | [diff] [blame] | 634 | public: |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 635 | Link(const ToolChain &TC) : Tool("visualstudio::Link", "linker", TC, |
| 636 | RF_Full, llvm::sys::WEM_UTF16) {} |
Michael J. Spencer | b186bc3 | 2010-08-21 21:55:07 +0000 | [diff] [blame] | 637 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 638 | bool hasIntegratedCPP() const override { return false; } |
| 639 | bool isLinkJob() const override { return true; } |
Michael J. Spencer | b186bc3 | 2010-08-21 21:55:07 +0000 | [diff] [blame] | 640 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 641 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 642 | const InputInfo &Output, const InputInfoList &Inputs, |
| 643 | const llvm::opt::ArgList &TCArgs, |
| 644 | const char *LinkingOutput) const override; |
Michael J. Spencer | b186bc3 | 2010-08-21 21:55:07 +0000 | [diff] [blame] | 645 | }; |
Hans Wennborg | 87cfa71 | 2013-09-19 20:32:16 +0000 | [diff] [blame] | 646 | |
| 647 | class LLVM_LIBRARY_VISIBILITY Compile : public Tool { |
| 648 | public: |
Reid Kleckner | 0290c9c | 2014-09-15 17:45:39 +0000 | [diff] [blame] | 649 | Compile(const ToolChain &TC) : Tool("visualstudio::Compile", "compiler", TC, |
| 650 | RF_Full, llvm::sys::WEM_UTF16) {} |
Hans Wennborg | 87cfa71 | 2013-09-19 20:32:16 +0000 | [diff] [blame] | 651 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 652 | bool hasIntegratedAssembler() const override { return true; } |
| 653 | bool hasIntegratedCPP() const override { return true; } |
| 654 | bool isLinkJob() const override { return false; } |
Hans Wennborg | 87cfa71 | 2013-09-19 20:32:16 +0000 | [diff] [blame] | 655 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 656 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 657 | const InputInfo &Output, const InputInfoList &Inputs, |
| 658 | const llvm::opt::ArgList &TCArgs, |
| 659 | const char *LinkingOutput) const override; |
Hans Wennborg | 87cfa71 | 2013-09-19 20:32:16 +0000 | [diff] [blame] | 660 | |
David Blaikie | c11bf80 | 2014-09-04 16:04:28 +0000 | [diff] [blame] | 661 | std::unique_ptr<Command> GetCommand(Compilation &C, const JobAction &JA, |
| 662 | const InputInfo &Output, |
| 663 | const InputInfoList &Inputs, |
| 664 | const llvm::opt::ArgList &TCArgs, |
| 665 | const char *LinkingOutput) const; |
Hans Wennborg | 87cfa71 | 2013-09-19 20:32:16 +0000 | [diff] [blame] | 666 | }; |
Michael J. Spencer | b186bc3 | 2010-08-21 21:55:07 +0000 | [diff] [blame] | 667 | } // end namespace visualstudio |
| 668 | |
Tim Northover | 9c7e035 | 2013-12-12 11:55:52 +0000 | [diff] [blame] | 669 | namespace arm { |
| 670 | StringRef getARMFloatABI(const Driver &D, const llvm::opt::ArgList &Args, |
Asiri Rathnayake | 9e3c7cb | 2014-10-03 09:11:41 +0000 | [diff] [blame] | 671 | const llvm::Triple &Triple); |
Tim Northover | 9c7e035 | 2013-12-12 11:55:52 +0000 | [diff] [blame] | 672 | } |
Robert Lytton | cf1dd69 | 2013-10-11 10:29:40 +0000 | [diff] [blame] | 673 | namespace XCore { |
| 674 | // For XCore, we do not need to instantiate tools for PreProcess, PreCompile and Compile. |
| 675 | // We simply use "clang -cc1" for those actions. |
| 676 | class LLVM_LIBRARY_VISIBILITY Assemble : public Tool { |
| 677 | public: |
| 678 | Assemble(const ToolChain &TC) : Tool("XCore::Assemble", |
| 679 | "XCore-as", TC) {} |
| 680 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 681 | bool hasIntegratedCPP() const override { return false; } |
| 682 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 683 | const InputInfo &Output, const InputInfoList &Inputs, |
| 684 | const llvm::opt::ArgList &TCArgs, |
| 685 | const char *LinkingOutput) const override; |
Robert Lytton | cf1dd69 | 2013-10-11 10:29:40 +0000 | [diff] [blame] | 686 | }; |
| 687 | |
| 688 | class LLVM_LIBRARY_VISIBILITY Link : public Tool { |
| 689 | public: |
| 690 | Link(const ToolChain &TC) : Tool("XCore::Link", |
| 691 | "XCore-ld", TC) {} |
| 692 | |
Craig Topper | b45acb8 | 2014-03-14 06:02:07 +0000 | [diff] [blame] | 693 | bool hasIntegratedCPP() const override { return false; } |
| 694 | bool isLinkJob() const override { return true; } |
| 695 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 696 | const InputInfo &Output, const InputInfoList &Inputs, |
| 697 | const llvm::opt::ArgList &TCArgs, |
| 698 | const char *LinkingOutput) const override; |
Robert Lytton | cf1dd69 | 2013-10-11 10:29:40 +0000 | [diff] [blame] | 699 | }; |
| 700 | } // end namespace XCore. |
| 701 | |
Saleem Abdulrasool | 543a78b | 2014-10-24 03:13:37 +0000 | [diff] [blame] | 702 | namespace CrossWindows { |
| 703 | class LLVM_LIBRARY_VISIBILITY Assemble : public Tool { |
| 704 | public: |
| 705 | Assemble(const ToolChain &TC) : Tool("CrossWindows::Assemble", "as", TC) { } |
| 706 | |
| 707 | bool hasIntegratedCPP() const override { return false; } |
| 708 | |
| 709 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 710 | const InputInfo &Output, const InputInfoList &Inputs, |
| 711 | const llvm::opt::ArgList &TCArgs, |
| 712 | const char *LinkingOutput) const override; |
| 713 | }; |
| 714 | |
| 715 | class LLVM_LIBRARY_VISIBILITY Link : public Tool { |
| 716 | public: |
| 717 | Link(const ToolChain &TC) : Tool("CrossWindows::Link", "ld", TC, RF_Full) {} |
| 718 | |
| 719 | bool hasIntegratedCPP() const override { return false; } |
| 720 | bool isLinkJob() const override { return true; } |
| 721 | |
| 722 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 723 | const InputInfo &Output, const InputInfoList &Inputs, |
| 724 | const llvm::opt::ArgList &TCArgs, |
| 725 | const char *LinkingOutput) const override; |
| 726 | }; |
| 727 | } |
Robert Lytton | cf1dd69 | 2013-10-11 10:29:40 +0000 | [diff] [blame] | 728 | |
Douglas Katzman | 9dc5fbb | 2015-06-03 16:56:50 +0000 | [diff] [blame] | 729 | } // end namespace tools |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 730 | } // end namespace driver |
| 731 | } // end namespace clang |
| 732 | |
Benjamin Kramer | 2f5db8b | 2014-08-13 16:25:19 +0000 | [diff] [blame] | 733 | #endif |