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 | |
| 10 | #ifndef CLANG_LIB_DRIVER_TOOLS_H_ |
| 11 | #define CLANG_LIB_DRIVER_TOOLS_H_ |
| 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" |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 16 | |
Joerg Sonnenberger | 637603a | 2011-05-16 13:35:02 +0000 | [diff] [blame] | 17 | #include "llvm/ADT/Triple.h" |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 18 | #include "llvm/Support/Compiler.h" |
| 19 | |
| 20 | namespace clang { |
| 21 | namespace driver { |
Douglas Gregor | 111af7d | 2009-04-18 00:34:01 +0000 | [diff] [blame] | 22 | class Driver; |
| 23 | |
Daniel Dunbar | c196421 | 2009-03-26 16:23:12 +0000 | [diff] [blame] | 24 | namespace toolchains { |
Daniel Dunbar | f0a5b9b | 2009-09-04 18:34:51 +0000 | [diff] [blame] | 25 | class Darwin; |
Daniel Dunbar | c196421 | 2009-03-26 16:23:12 +0000 | [diff] [blame] | 26 | } |
| 27 | |
Daniel Dunbar | 15abb2e | 2009-03-17 22:18:43 +0000 | [diff] [blame] | 28 | namespace tools { |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 29 | |
Daniel Dunbar | 4f5e79c | 2010-05-20 21:30:13 +0000 | [diff] [blame] | 30 | /// \brief Clang compiler tool. |
Duncan Sands | af260b9 | 2010-05-11 20:16:05 +0000 | [diff] [blame] | 31 | class LLVM_LIBRARY_VISIBILITY Clang : public Tool { |
Peter Collingbourne | 9b515cb | 2011-11-06 00:40:05 +0000 | [diff] [blame] | 32 | void AddPreprocessingOptions(Compilation &C, |
| 33 | const Driver &D, |
Douglas Gregor | 111af7d | 2009-04-18 00:34:01 +0000 | [diff] [blame] | 34 | const ArgList &Args, |
Daniel Dunbar | d067f7f | 2009-04-08 23:54:23 +0000 | [diff] [blame] | 35 | ArgStringList &CmdArgs, |
| 36 | const InputInfo &Output, |
| 37 | const InputInfoList &Inputs) const; |
| 38 | |
Daniel Dunbar | c9388c1 | 2011-03-17 17:10:06 +0000 | [diff] [blame] | 39 | void AddARMTargetArgs(const ArgList &Args, ArgStringList &CmdArgs, |
| 40 | bool KernelOrKext) const; |
Eric Christopher | 0b26a61 | 2010-03-02 02:41:08 +0000 | [diff] [blame] | 41 | void AddMIPSTargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const; |
Bruno Cardoso Lopes | e7f211c | 2010-11-09 17:21:19 +0000 | [diff] [blame] | 42 | void AddSparcTargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const; |
Daniel Dunbar | 3b3191f | 2009-09-09 22:33:08 +0000 | [diff] [blame] | 43 | void AddX86TargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const; |
Tony Linthicum | 76329bf | 2011-12-12 21:14:55 +0000 | [diff] [blame^] | 44 | void AddHexagonTargetArgs (const ArgList &Args, ArgStringList &CmdArgs) const; |
Daniel Dunbar | 3b3191f | 2009-09-09 22:33:08 +0000 | [diff] [blame] | 45 | |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 46 | public: |
Daniel Dunbar | 1cb532c | 2010-05-22 00:37:18 +0000 | [diff] [blame] | 47 | Clang(const ToolChain &TC) : Tool("clang", "clang frontend", TC) {} |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 48 | |
Daniel Dunbar | 3d45e17 | 2010-04-06 17:07:49 +0000 | [diff] [blame] | 49 | virtual bool hasGoodDiagnostics() const { return true; } |
Daniel Dunbar | c434394 | 2010-02-03 03:07:56 +0000 | [diff] [blame] | 50 | virtual bool hasIntegratedAssembler() const { return true; } |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 51 | virtual bool hasIntegratedCPP() const { return true; } |
Daniel Dunbar | 1a093d2 | 2009-03-18 06:00:36 +0000 | [diff] [blame] | 52 | |
| 53 | virtual void ConstructJob(Compilation &C, const JobAction &JA, |
Mike Stump | 11289f4 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 54 | const InputInfo &Output, |
| 55 | const InputInfoList &Inputs, |
| 56 | const ArgList &TCArgs, |
Daniel Dunbar | 1a093d2 | 2009-03-18 06:00:36 +0000 | [diff] [blame] | 57 | const char *LinkingOutput) const; |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 58 | }; |
| 59 | |
Daniel Dunbar | 4f5e79c | 2010-05-20 21:30:13 +0000 | [diff] [blame] | 60 | /// \brief Clang integrated assembler tool. |
| 61 | class LLVM_LIBRARY_VISIBILITY ClangAs : public Tool { |
| 62 | public: |
Daniel Dunbar | 1cb532c | 2010-05-22 00:37:18 +0000 | [diff] [blame] | 63 | ClangAs(const ToolChain &TC) : Tool("clang::as", |
| 64 | "clang integrated assembler", TC) {} |
Daniel Dunbar | 4f5e79c | 2010-05-20 21:30:13 +0000 | [diff] [blame] | 65 | |
Daniel Dunbar | 4f5e79c | 2010-05-20 21:30:13 +0000 | [diff] [blame] | 66 | virtual bool hasGoodDiagnostics() const { return true; } |
| 67 | virtual bool hasIntegratedAssembler() const { return false; } |
| 68 | virtual bool hasIntegratedCPP() const { return false; } |
| 69 | |
| 70 | virtual void ConstructJob(Compilation &C, const JobAction &JA, |
Daniel Dunbar | 4f5e79c | 2010-05-20 21:30:13 +0000 | [diff] [blame] | 71 | const InputInfo &Output, |
| 72 | const InputInfoList &Inputs, |
| 73 | const ArgList &TCArgs, |
| 74 | const char *LinkingOutput) const; |
| 75 | }; |
| 76 | |
Daniel Dunbar | 82116f8 | 2009-03-17 22:45:24 +0000 | [diff] [blame] | 77 | /// gcc - Generic GCC tool implementations. |
| 78 | namespace gcc { |
Duncan Sands | af260b9 | 2010-05-11 20:16:05 +0000 | [diff] [blame] | 79 | class LLVM_LIBRARY_VISIBILITY Common : public Tool { |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 80 | public: |
Daniel Dunbar | 1cb532c | 2010-05-22 00:37:18 +0000 | [diff] [blame] | 81 | Common(const char *Name, const char *ShortName, |
| 82 | const ToolChain &TC) : Tool(Name, ShortName, TC) {} |
Daniel Dunbar | a3246a0 | 2009-03-18 08:07:30 +0000 | [diff] [blame] | 83 | |
| 84 | virtual void ConstructJob(Compilation &C, const JobAction &JA, |
Mike Stump | 11289f4 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 85 | const InputInfo &Output, |
| 86 | const InputInfoList &Inputs, |
| 87 | const ArgList &TCArgs, |
Daniel Dunbar | a3246a0 | 2009-03-18 08:07:30 +0000 | [diff] [blame] | 88 | const char *LinkingOutput) const; |
| 89 | |
| 90 | /// RenderExtraToolArgs - Render any arguments necessary to force |
| 91 | /// the particular tool mode. |
Daniel Dunbar | 4e29505 | 2010-01-25 22:35:08 +0000 | [diff] [blame] | 92 | virtual void RenderExtraToolArgs(const JobAction &JA, |
| 93 | ArgStringList &CmdArgs) const = 0; |
Daniel Dunbar | a3246a0 | 2009-03-18 08:07:30 +0000 | [diff] [blame] | 94 | }; |
| 95 | |
Mike Stump | 11289f4 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 96 | |
Duncan Sands | af260b9 | 2010-05-11 20:16:05 +0000 | [diff] [blame] | 97 | class LLVM_LIBRARY_VISIBILITY Preprocess : public Common { |
Daniel Dunbar | a3246a0 | 2009-03-18 08:07:30 +0000 | [diff] [blame] | 98 | public: |
Daniel Dunbar | 1cb532c | 2010-05-22 00:37:18 +0000 | [diff] [blame] | 99 | Preprocess(const ToolChain &TC) : Common("gcc::Preprocess", |
| 100 | "gcc preprocessor", TC) {} |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 101 | |
Daniel Dunbar | 3d45e17 | 2010-04-06 17:07:49 +0000 | [diff] [blame] | 102 | virtual bool hasGoodDiagnostics() const { return true; } |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 103 | virtual bool hasIntegratedCPP() const { return false; } |
Daniel Dunbar | 1a093d2 | 2009-03-18 06:00:36 +0000 | [diff] [blame] | 104 | |
Daniel Dunbar | 4e29505 | 2010-01-25 22:35:08 +0000 | [diff] [blame] | 105 | virtual void RenderExtraToolArgs(const JobAction &JA, |
| 106 | ArgStringList &CmdArgs) const; |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 107 | }; |
| 108 | |
Duncan Sands | af260b9 | 2010-05-11 20:16:05 +0000 | [diff] [blame] | 109 | class LLVM_LIBRARY_VISIBILITY Precompile : public Common { |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 110 | public: |
Daniel Dunbar | 1cb532c | 2010-05-22 00:37:18 +0000 | [diff] [blame] | 111 | Precompile(const ToolChain &TC) : Common("gcc::Precompile", |
| 112 | "gcc precompile", TC) {} |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 113 | |
Daniel Dunbar | 3d45e17 | 2010-04-06 17:07:49 +0000 | [diff] [blame] | 114 | virtual bool hasGoodDiagnostics() const { return true; } |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 115 | virtual bool hasIntegratedCPP() const { return true; } |
Daniel Dunbar | 1a093d2 | 2009-03-18 06:00:36 +0000 | [diff] [blame] | 116 | |
Daniel Dunbar | 4e29505 | 2010-01-25 22:35:08 +0000 | [diff] [blame] | 117 | virtual void RenderExtraToolArgs(const JobAction &JA, |
| 118 | ArgStringList &CmdArgs) const; |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 119 | }; |
| 120 | |
Duncan Sands | af260b9 | 2010-05-11 20:16:05 +0000 | [diff] [blame] | 121 | class LLVM_LIBRARY_VISIBILITY Compile : public Common { |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 122 | public: |
Daniel Dunbar | 1cb532c | 2010-05-22 00:37:18 +0000 | [diff] [blame] | 123 | Compile(const ToolChain &TC) : Common("gcc::Compile", |
| 124 | "gcc frontend", TC) {} |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 125 | |
Daniel Dunbar | 3d45e17 | 2010-04-06 17:07:49 +0000 | [diff] [blame] | 126 | virtual bool hasGoodDiagnostics() const { return true; } |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 127 | virtual bool hasIntegratedCPP() const { return true; } |
Daniel Dunbar | 1a093d2 | 2009-03-18 06:00:36 +0000 | [diff] [blame] | 128 | |
Daniel Dunbar | 4e29505 | 2010-01-25 22:35:08 +0000 | [diff] [blame] | 129 | virtual void RenderExtraToolArgs(const JobAction &JA, |
| 130 | ArgStringList &CmdArgs) const; |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 131 | }; |
| 132 | |
Duncan Sands | af260b9 | 2010-05-11 20:16:05 +0000 | [diff] [blame] | 133 | class LLVM_LIBRARY_VISIBILITY Assemble : public Common { |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 134 | public: |
Daniel Dunbar | 1cb532c | 2010-05-22 00:37:18 +0000 | [diff] [blame] | 135 | Assemble(const ToolChain &TC) : Common("gcc::Assemble", |
| 136 | "assembler (via gcc)", TC) {} |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 137 | |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 138 | virtual bool hasIntegratedCPP() const { return false; } |
Daniel Dunbar | 1a093d2 | 2009-03-18 06:00:36 +0000 | [diff] [blame] | 139 | |
Daniel Dunbar | 4e29505 | 2010-01-25 22:35:08 +0000 | [diff] [blame] | 140 | virtual void RenderExtraToolArgs(const JobAction &JA, |
| 141 | ArgStringList &CmdArgs) const; |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 142 | }; |
| 143 | |
Duncan Sands | af260b9 | 2010-05-11 20:16:05 +0000 | [diff] [blame] | 144 | class LLVM_LIBRARY_VISIBILITY Link : public Common { |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 145 | public: |
Daniel Dunbar | 1cb532c | 2010-05-22 00:37:18 +0000 | [diff] [blame] | 146 | Link(const ToolChain &TC) : Common("gcc::Link", |
| 147 | "linker (via gcc)", TC) {} |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 148 | |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 149 | virtual bool hasIntegratedCPP() const { return false; } |
Daniel Dunbar | 1a093d2 | 2009-03-18 06:00:36 +0000 | [diff] [blame] | 150 | |
Daniel Dunbar | 4e29505 | 2010-01-25 22:35:08 +0000 | [diff] [blame] | 151 | virtual void RenderExtraToolArgs(const JobAction &JA, |
| 152 | ArgStringList &CmdArgs) const; |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 153 | }; |
Daniel Dunbar | 82116f8 | 2009-03-17 22:45:24 +0000 | [diff] [blame] | 154 | } // end namespace gcc |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 155 | |
Tony Linthicum | 76329bf | 2011-12-12 21:14:55 +0000 | [diff] [blame^] | 156 | namespace hexagon { |
| 157 | // For Hexagon, we do not need to instantiate tools for PreProcess, PreCompile and Compile. |
| 158 | // We simply use "clang -cc1" for those actions. |
| 159 | class LLVM_LIBRARY_VISIBILITY Assemble : public Tool { |
| 160 | public: |
| 161 | Assemble(const ToolChain &TC) : Tool("hexagon::Assemble", |
| 162 | "hexagon-as", TC) {} |
| 163 | |
| 164 | virtual bool hasIntegratedCPP() const { return false; } |
| 165 | |
| 166 | virtual void RenderExtraToolArgs(const JobAction &JA, |
| 167 | ArgStringList &CmdArgs) const; |
| 168 | virtual void ConstructJob(Compilation &C, const JobAction &JA, |
| 169 | const InputInfo &Output, |
| 170 | const InputInfoList &Inputs, |
| 171 | const ArgList &TCArgs, |
| 172 | const char *LinkingOutput) const; |
| 173 | }; |
| 174 | |
| 175 | class LLVM_LIBRARY_VISIBILITY Link : public Tool { |
| 176 | public: |
| 177 | Link(const ToolChain &TC) : Tool("hexagon::Link", |
| 178 | "hexagon-ld", TC) {} |
| 179 | |
| 180 | virtual bool hasIntegratedCPP() const { return false; } |
| 181 | |
| 182 | virtual void RenderExtraToolArgs(const JobAction &JA, |
| 183 | ArgStringList &CmdArgs) const; |
| 184 | virtual void ConstructJob(Compilation &C, const JobAction &JA, |
| 185 | const InputInfo &Output, |
| 186 | const InputInfoList &Inputs, |
| 187 | const ArgList &TCArgs, |
| 188 | const char *LinkingOutput) const; |
| 189 | }; |
| 190 | } // end namespace hexagon. |
| 191 | |
| 192 | |
Daniel Dunbar | 64ed5e3 | 2009-03-20 00:52:38 +0000 | [diff] [blame] | 193 | namespace darwin { |
Duncan Sands | af260b9 | 2010-05-11 20:16:05 +0000 | [diff] [blame] | 194 | class LLVM_LIBRARY_VISIBILITY DarwinTool : public Tool { |
Daniel Dunbar | e9ded43 | 2009-09-09 18:36:20 +0000 | [diff] [blame] | 195 | protected: |
| 196 | void AddDarwinArch(const ArgList &Args, ArgStringList &CmdArgs) const; |
Daniel Dunbar | e9ded43 | 2009-09-09 18:36:20 +0000 | [diff] [blame] | 197 | |
| 198 | const toolchains::Darwin &getDarwinToolChain() const { |
| 199 | return reinterpret_cast<const toolchains::Darwin&>(getToolChain()); |
| 200 | } |
| 201 | |
| 202 | public: |
Daniel Dunbar | 1cb532c | 2010-05-22 00:37:18 +0000 | [diff] [blame] | 203 | DarwinTool(const char *Name, const char *ShortName, |
| 204 | const ToolChain &TC) : Tool(Name, ShortName, TC) {} |
Daniel Dunbar | e9ded43 | 2009-09-09 18:36:20 +0000 | [diff] [blame] | 205 | }; |
| 206 | |
Duncan Sands | af260b9 | 2010-05-11 20:16:05 +0000 | [diff] [blame] | 207 | class LLVM_LIBRARY_VISIBILITY CC1 : public DarwinTool { |
Daniel Dunbar | 52e96cc | 2009-03-30 00:34:04 +0000 | [diff] [blame] | 208 | public: |
Mike Stump | 11289f4 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 209 | static const char *getBaseInputName(const ArgList &Args, |
Daniel Dunbar | 52e96cc | 2009-03-30 00:34:04 +0000 | [diff] [blame] | 210 | const InputInfoList &Input); |
Mike Stump | 11289f4 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 211 | static const char *getBaseInputStem(const ArgList &Args, |
Daniel Dunbar | 52e96cc | 2009-03-30 00:34:04 +0000 | [diff] [blame] | 212 | const InputInfoList &Input); |
Mike Stump | 11289f4 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 213 | static const char *getDependencyFileName(const ArgList &Args, |
Daniel Dunbar | 52e96cc | 2009-03-30 00:34:04 +0000 | [diff] [blame] | 214 | const InputInfoList &Inputs); |
| 215 | |
Daniel Dunbar | e6adeee | 2009-03-29 17:08:39 +0000 | [diff] [blame] | 216 | protected: |
| 217 | const char *getCC1Name(types::ID Type) const; |
| 218 | |
Daniel Dunbar | afec1f5 | 2009-03-29 18:40:18 +0000 | [diff] [blame] | 219 | void AddCC1Args(const ArgList &Args, ArgStringList &CmdArgs) const; |
Chad Rosier | bc5ea3d | 2011-08-17 18:24:55 +0000 | [diff] [blame] | 220 | void RemoveCC1UnsupportedArgs(ArgStringList &CmdArgs) const; |
Daniel Dunbar | e6adeee | 2009-03-29 17:08:39 +0000 | [diff] [blame] | 221 | void AddCC1OptionsArgs(const ArgList &Args, ArgStringList &CmdArgs, |
| 222 | const InputInfoList &Inputs, |
Daniel Dunbar | afec1f5 | 2009-03-29 18:40:18 +0000 | [diff] [blame] | 223 | const ArgStringList &OutputArgs) const; |
Daniel Dunbar | e6adeee | 2009-03-29 17:08:39 +0000 | [diff] [blame] | 224 | void AddCPPOptionsArgs(const ArgList &Args, ArgStringList &CmdArgs, |
| 225 | const InputInfoList &Inputs, |
Daniel Dunbar | afec1f5 | 2009-03-29 18:40:18 +0000 | [diff] [blame] | 226 | const ArgStringList &OutputArgs) const; |
Mike Stump | 11289f4 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 227 | void AddCPPUniqueOptionsArgs(const ArgList &Args, |
Daniel Dunbar | afec1f5 | 2009-03-29 18:40:18 +0000 | [diff] [blame] | 228 | ArgStringList &CmdArgs, |
| 229 | const InputInfoList &Inputs) const; |
| 230 | void AddCPPArgs(const ArgList &Args, ArgStringList &CmdArgs) const; |
Daniel Dunbar | e6adeee | 2009-03-29 17:08:39 +0000 | [diff] [blame] | 231 | |
| 232 | public: |
Daniel Dunbar | 1cb532c | 2010-05-22 00:37:18 +0000 | [diff] [blame] | 233 | CC1(const char *Name, const char *ShortName, |
| 234 | const ToolChain &TC) : DarwinTool(Name, ShortName, TC) {} |
Daniel Dunbar | e6adeee | 2009-03-29 17:08:39 +0000 | [diff] [blame] | 235 | |
Daniel Dunbar | 3d45e17 | 2010-04-06 17:07:49 +0000 | [diff] [blame] | 236 | virtual bool hasGoodDiagnostics() const { return true; } |
Daniel Dunbar | e6adeee | 2009-03-29 17:08:39 +0000 | [diff] [blame] | 237 | virtual bool hasIntegratedCPP() const { return true; } |
| 238 | }; |
| 239 | |
Duncan Sands | af260b9 | 2010-05-11 20:16:05 +0000 | [diff] [blame] | 240 | class LLVM_LIBRARY_VISIBILITY Preprocess : public CC1 { |
Daniel Dunbar | e6adeee | 2009-03-29 17:08:39 +0000 | [diff] [blame] | 241 | public: |
Daniel Dunbar | 1cb532c | 2010-05-22 00:37:18 +0000 | [diff] [blame] | 242 | Preprocess(const ToolChain &TC) : CC1("darwin::Preprocess", |
| 243 | "gcc preprocessor", TC) {} |
Daniel Dunbar | e6adeee | 2009-03-29 17:08:39 +0000 | [diff] [blame] | 244 | |
| 245 | virtual void ConstructJob(Compilation &C, const JobAction &JA, |
Mike Stump | 11289f4 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 246 | const InputInfo &Output, |
| 247 | const InputInfoList &Inputs, |
| 248 | const ArgList &TCArgs, |
Daniel Dunbar | e6adeee | 2009-03-29 17:08:39 +0000 | [diff] [blame] | 249 | const char *LinkingOutput) const; |
| 250 | }; |
| 251 | |
Duncan Sands | af260b9 | 2010-05-11 20:16:05 +0000 | [diff] [blame] | 252 | class LLVM_LIBRARY_VISIBILITY Compile : public CC1 { |
Daniel Dunbar | e6adeee | 2009-03-29 17:08:39 +0000 | [diff] [blame] | 253 | public: |
Daniel Dunbar | 1cb532c | 2010-05-22 00:37:18 +0000 | [diff] [blame] | 254 | Compile(const ToolChain &TC) : CC1("darwin::Compile", "gcc frontend", TC) {} |
Daniel Dunbar | e6adeee | 2009-03-29 17:08:39 +0000 | [diff] [blame] | 255 | |
| 256 | virtual void ConstructJob(Compilation &C, const JobAction &JA, |
Mike Stump | 11289f4 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 257 | const InputInfo &Output, |
| 258 | const InputInfoList &Inputs, |
| 259 | const ArgList &TCArgs, |
Daniel Dunbar | e6adeee | 2009-03-29 17:08:39 +0000 | [diff] [blame] | 260 | const char *LinkingOutput) const; |
| 261 | }; |
| 262 | |
Duncan Sands | af260b9 | 2010-05-11 20:16:05 +0000 | [diff] [blame] | 263 | class LLVM_LIBRARY_VISIBILITY Assemble : public DarwinTool { |
Daniel Dunbar | be22084 | 2009-03-20 16:06:39 +0000 | [diff] [blame] | 264 | public: |
Daniel Dunbar | 1cb532c | 2010-05-22 00:37:18 +0000 | [diff] [blame] | 265 | Assemble(const ToolChain &TC) : DarwinTool("darwin::Assemble", |
| 266 | "assembler", TC) {} |
Daniel Dunbar | be22084 | 2009-03-20 16:06:39 +0000 | [diff] [blame] | 267 | |
Daniel Dunbar | be22084 | 2009-03-20 16:06:39 +0000 | [diff] [blame] | 268 | virtual bool hasIntegratedCPP() const { return false; } |
| 269 | |
| 270 | virtual void ConstructJob(Compilation &C, const JobAction &JA, |
Mike Stump | 11289f4 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 271 | const InputInfo &Output, |
| 272 | const InputInfoList &Inputs, |
| 273 | const ArgList &TCArgs, |
Daniel Dunbar | be22084 | 2009-03-20 16:06:39 +0000 | [diff] [blame] | 274 | const char *LinkingOutput) const; |
| 275 | }; |
| 276 | |
Duncan Sands | af260b9 | 2010-05-11 20:16:05 +0000 | [diff] [blame] | 277 | class LLVM_LIBRARY_VISIBILITY Link : public DarwinTool { |
Daniel Dunbar | ccbc452 | 2010-09-09 21:51:05 +0000 | [diff] [blame] | 278 | void AddLinkArgs(Compilation &C, const ArgList &Args, |
| 279 | ArgStringList &CmdArgs) const; |
Daniel Dunbar | c196421 | 2009-03-26 16:23:12 +0000 | [diff] [blame] | 280 | |
Daniel Dunbar | c196421 | 2009-03-26 16:23:12 +0000 | [diff] [blame] | 281 | public: |
Daniel Dunbar | 1cb532c | 2010-05-22 00:37:18 +0000 | [diff] [blame] | 282 | Link(const ToolChain &TC) : DarwinTool("darwin::Link", "linker", TC) {} |
Daniel Dunbar | c196421 | 2009-03-26 16:23:12 +0000 | [diff] [blame] | 283 | |
Daniel Dunbar | c196421 | 2009-03-26 16:23:12 +0000 | [diff] [blame] | 284 | virtual bool hasIntegratedCPP() const { return false; } |
| 285 | |
| 286 | virtual void ConstructJob(Compilation &C, const JobAction &JA, |
Mike Stump | 11289f4 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 287 | const InputInfo &Output, |
| 288 | const InputInfoList &Inputs, |
| 289 | const ArgList &TCArgs, |
Daniel Dunbar | c196421 | 2009-03-26 16:23:12 +0000 | [diff] [blame] | 290 | const char *LinkingOutput) const; |
| 291 | }; |
| 292 | |
Duncan Sands | af260b9 | 2010-05-11 20:16:05 +0000 | [diff] [blame] | 293 | class LLVM_LIBRARY_VISIBILITY Lipo : public DarwinTool { |
Daniel Dunbar | 64ed5e3 | 2009-03-20 00:52:38 +0000 | [diff] [blame] | 294 | public: |
Daniel Dunbar | 1cb532c | 2010-05-22 00:37:18 +0000 | [diff] [blame] | 295 | Lipo(const ToolChain &TC) : DarwinTool("darwin::Lipo", "lipo", TC) {} |
Daniel Dunbar | 64ed5e3 | 2009-03-20 00:52:38 +0000 | [diff] [blame] | 296 | |
Daniel Dunbar | 64ed5e3 | 2009-03-20 00:52:38 +0000 | [diff] [blame] | 297 | virtual bool hasIntegratedCPP() const { return false; } |
| 298 | |
| 299 | virtual void ConstructJob(Compilation &C, const JobAction &JA, |
Mike Stump | 11289f4 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 300 | const InputInfo &Output, |
| 301 | const InputInfoList &Inputs, |
| 302 | const ArgList &TCArgs, |
Daniel Dunbar | 64ed5e3 | 2009-03-20 00:52:38 +0000 | [diff] [blame] | 303 | const char *LinkingOutput) const; |
| 304 | }; |
Daniel Dunbar | 8829962 | 2010-06-04 18:28:36 +0000 | [diff] [blame] | 305 | |
| 306 | class LLVM_LIBRARY_VISIBILITY Dsymutil : public DarwinTool { |
| 307 | public: |
| 308 | Dsymutil(const ToolChain &TC) : DarwinTool("darwin::Dsymutil", |
| 309 | "dsymutil", TC) {} |
| 310 | |
Daniel Dunbar | 8829962 | 2010-06-04 18:28:36 +0000 | [diff] [blame] | 311 | virtual bool hasIntegratedCPP() const { return false; } |
| 312 | |
| 313 | virtual void ConstructJob(Compilation &C, const JobAction &JA, |
Daniel Dunbar | 8829962 | 2010-06-04 18:28:36 +0000 | [diff] [blame] | 314 | const InputInfo &Output, |
| 315 | const InputInfoList &Inputs, |
| 316 | const ArgList &TCArgs, |
| 317 | const char *LinkingOutput) const; |
| 318 | }; |
Eric Christopher | 551ef45 | 2011-08-23 17:56:55 +0000 | [diff] [blame] | 319 | |
| 320 | class LLVM_LIBRARY_VISIBILITY VerifyDebug : public DarwinTool { |
| 321 | public: |
| 322 | VerifyDebug(const ToolChain &TC) : DarwinTool("darwin::VerifyDebug", |
| 323 | "dwarfdump", TC) {} |
| 324 | |
| 325 | virtual bool hasIntegratedCPP() const { return false; } |
| 326 | |
| 327 | virtual void ConstructJob(Compilation &C, const JobAction &JA, |
| 328 | const InputInfo &Output, |
| 329 | const InputInfoList &Inputs, |
| 330 | const ArgList &TCArgs, |
| 331 | const char *LinkingOutput) const; |
| 332 | }; |
| 333 | |
Daniel Dunbar | 64ed5e3 | 2009-03-20 00:52:38 +0000 | [diff] [blame] | 334 | } |
| 335 | |
Daniel Dunbar | 10de9e6 | 2009-06-29 20:52:51 +0000 | [diff] [blame] | 336 | /// openbsd -- Directly call GNU Binutils assembler and linker |
| 337 | namespace openbsd { |
Duncan Sands | af260b9 | 2010-05-11 20:16:05 +0000 | [diff] [blame] | 338 | class LLVM_LIBRARY_VISIBILITY Assemble : public Tool { |
Daniel Dunbar | 10de9e6 | 2009-06-29 20:52:51 +0000 | [diff] [blame] | 339 | public: |
Daniel Dunbar | 1cb532c | 2010-05-22 00:37:18 +0000 | [diff] [blame] | 340 | Assemble(const ToolChain &TC) : Tool("openbsd::Assemble", "assembler", |
| 341 | TC) {} |
Daniel Dunbar | 10de9e6 | 2009-06-29 20:52:51 +0000 | [diff] [blame] | 342 | |
Daniel Dunbar | 10de9e6 | 2009-06-29 20:52:51 +0000 | [diff] [blame] | 343 | virtual bool hasIntegratedCPP() const { return false; } |
| 344 | |
| 345 | virtual void ConstructJob(Compilation &C, const JobAction &JA, |
Mike Stump | 11289f4 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 346 | const InputInfo &Output, |
| 347 | const InputInfoList &Inputs, |
| 348 | const ArgList &TCArgs, |
Daniel Dunbar | 10de9e6 | 2009-06-29 20:52:51 +0000 | [diff] [blame] | 349 | const char *LinkingOutput) const; |
| 350 | }; |
Duncan Sands | af260b9 | 2010-05-11 20:16:05 +0000 | [diff] [blame] | 351 | class LLVM_LIBRARY_VISIBILITY Link : public Tool { |
Daniel Dunbar | 10de9e6 | 2009-06-29 20:52:51 +0000 | [diff] [blame] | 352 | public: |
Daniel Dunbar | 1cb532c | 2010-05-22 00:37:18 +0000 | [diff] [blame] | 353 | Link(const ToolChain &TC) : Tool("openbsd::Link", "linker", TC) {} |
Daniel Dunbar | 10de9e6 | 2009-06-29 20:52:51 +0000 | [diff] [blame] | 354 | |
Daniel Dunbar | 10de9e6 | 2009-06-29 20:52:51 +0000 | [diff] [blame] | 355 | virtual bool hasIntegratedCPP() const { return false; } |
| 356 | |
| 357 | virtual void ConstructJob(Compilation &C, const JobAction &JA, |
Mike Stump | 11289f4 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 358 | const InputInfo &Output, |
| 359 | const InputInfoList &Inputs, |
| 360 | const ArgList &TCArgs, |
Daniel Dunbar | 10de9e6 | 2009-06-29 20:52:51 +0000 | [diff] [blame] | 361 | const char *LinkingOutput) const; |
| 362 | }; |
Edward O'Callaghan | 856e4ff | 2009-08-22 01:06:46 +0000 | [diff] [blame] | 363 | } // end namespace openbsd |
Daniel Dunbar | 10de9e6 | 2009-06-29 20:52:51 +0000 | [diff] [blame] | 364 | |
Daniel Dunbar | 8eb473c | 2009-03-31 17:45:15 +0000 | [diff] [blame] | 365 | /// freebsd -- Directly call GNU Binutils assembler and linker |
| 366 | namespace freebsd { |
Duncan Sands | af260b9 | 2010-05-11 20:16:05 +0000 | [diff] [blame] | 367 | class LLVM_LIBRARY_VISIBILITY Assemble : public Tool { |
Daniel Dunbar | 8eb473c | 2009-03-31 17:45:15 +0000 | [diff] [blame] | 368 | public: |
Daniel Dunbar | 1cb532c | 2010-05-22 00:37:18 +0000 | [diff] [blame] | 369 | Assemble(const ToolChain &TC) : Tool("freebsd::Assemble", "assembler", |
| 370 | TC) {} |
Daniel Dunbar | 8eb473c | 2009-03-31 17:45:15 +0000 | [diff] [blame] | 371 | |
Daniel Dunbar | 8eb473c | 2009-03-31 17:45:15 +0000 | [diff] [blame] | 372 | virtual bool hasIntegratedCPP() const { return false; } |
| 373 | |
| 374 | virtual void ConstructJob(Compilation &C, const JobAction &JA, |
Mike Stump | 11289f4 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 375 | const InputInfo &Output, |
| 376 | const InputInfoList &Inputs, |
| 377 | const ArgList &TCArgs, |
Daniel Dunbar | 8eb473c | 2009-03-31 17:45:15 +0000 | [diff] [blame] | 378 | const char *LinkingOutput) const; |
| 379 | }; |
Duncan Sands | af260b9 | 2010-05-11 20:16:05 +0000 | [diff] [blame] | 380 | class LLVM_LIBRARY_VISIBILITY Link : public Tool { |
Daniel Dunbar | d854c8d | 2009-04-01 19:36:32 +0000 | [diff] [blame] | 381 | public: |
Daniel Dunbar | 1cb532c | 2010-05-22 00:37:18 +0000 | [diff] [blame] | 382 | Link(const ToolChain &TC) : Tool("freebsd::Link", "linker", TC) {} |
Daniel Dunbar | d854c8d | 2009-04-01 19:36:32 +0000 | [diff] [blame] | 383 | |
Daniel Dunbar | d854c8d | 2009-04-01 19:36:32 +0000 | [diff] [blame] | 384 | virtual bool hasIntegratedCPP() const { return false; } |
| 385 | |
| 386 | virtual void ConstructJob(Compilation &C, const JobAction &JA, |
Mike Stump | 11289f4 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 387 | const InputInfo &Output, |
| 388 | const InputInfoList &Inputs, |
| 389 | const ArgList &TCArgs, |
Daniel Dunbar | d854c8d | 2009-04-01 19:36:32 +0000 | [diff] [blame] | 390 | const char *LinkingOutput) const; |
| 391 | }; |
Edward O'Callaghan | 856e4ff | 2009-08-22 01:06:46 +0000 | [diff] [blame] | 392 | } // end namespace freebsd |
| 393 | |
Benjamin Kramer | 24f1d3e | 2011-02-02 18:59:27 +0000 | [diff] [blame] | 394 | /// netbsd -- Directly call GNU Binutils assembler and linker |
| 395 | namespace netbsd { |
| 396 | class LLVM_LIBRARY_VISIBILITY Assemble : public Tool { |
Joerg Sonnenberger | 637603a | 2011-05-16 13:35:02 +0000 | [diff] [blame] | 397 | private: |
| 398 | const llvm::Triple ToolTriple; |
| 399 | |
Benjamin Kramer | 24f1d3e | 2011-02-02 18:59:27 +0000 | [diff] [blame] | 400 | public: |
Joerg Sonnenberger | 637603a | 2011-05-16 13:35:02 +0000 | [diff] [blame] | 401 | Assemble(const ToolChain &TC, const llvm::Triple &ToolTriple) |
| 402 | : Tool("netbsd::Assemble", "assembler", TC), ToolTriple(ToolTriple) {} |
Benjamin Kramer | 24f1d3e | 2011-02-02 18:59:27 +0000 | [diff] [blame] | 403 | |
| 404 | virtual bool hasIntegratedCPP() const { return false; } |
| 405 | |
| 406 | virtual void ConstructJob(Compilation &C, const JobAction &JA, |
| 407 | const InputInfo &Output, |
| 408 | const InputInfoList &Inputs, |
| 409 | const ArgList &TCArgs, |
| 410 | const char *LinkingOutput) const; |
| 411 | }; |
| 412 | class LLVM_LIBRARY_VISIBILITY Link : public Tool { |
Joerg Sonnenberger | 637603a | 2011-05-16 13:35:02 +0000 | [diff] [blame] | 413 | private: |
| 414 | const llvm::Triple ToolTriple; |
| 415 | |
Benjamin Kramer | 24f1d3e | 2011-02-02 18:59:27 +0000 | [diff] [blame] | 416 | public: |
Joerg Sonnenberger | 637603a | 2011-05-16 13:35:02 +0000 | [diff] [blame] | 417 | Link(const ToolChain &TC, const llvm::Triple &ToolTriple) |
Joerg Sonnenberger | 4eb724f | 2011-06-21 08:45:08 +0000 | [diff] [blame] | 418 | : Tool("netbsd::Link", "linker", TC), ToolTriple(ToolTriple) {} |
Benjamin Kramer | 24f1d3e | 2011-02-02 18:59:27 +0000 | [diff] [blame] | 419 | |
| 420 | virtual bool hasIntegratedCPP() const { return false; } |
| 421 | |
| 422 | virtual void ConstructJob(Compilation &C, const JobAction &JA, |
| 423 | const InputInfo &Output, |
| 424 | const InputInfoList &Inputs, |
| 425 | const ArgList &TCArgs, |
| 426 | const char *LinkingOutput) const; |
| 427 | }; |
| 428 | } // end namespace netbsd |
| 429 | |
Rafael Espindola | 92b0093 | 2010-08-10 00:25:48 +0000 | [diff] [blame] | 430 | /// linux -- Directly call GNU Binutils assembler and linker |
| 431 | namespace linuxtools { |
| 432 | class LLVM_LIBRARY_VISIBILITY Assemble : public Tool { |
| 433 | public: |
| 434 | Assemble(const ToolChain &TC) : Tool("linux::Assemble", "assembler", |
| 435 | TC) {} |
| 436 | |
| 437 | virtual bool hasIntegratedCPP() const { return false; } |
| 438 | |
| 439 | virtual void ConstructJob(Compilation &C, const JobAction &JA, |
| 440 | const InputInfo &Output, |
| 441 | const InputInfoList &Inputs, |
| 442 | const ArgList &TCArgs, |
| 443 | const char *LinkingOutput) const; |
| 444 | }; |
Rafael Espindola | c8f008f | 2010-11-07 20:14:31 +0000 | [diff] [blame] | 445 | class LLVM_LIBRARY_VISIBILITY Link : public Tool { |
| 446 | public: |
| 447 | Link(const ToolChain &TC) : Tool("linux::Link", "linker", TC) {} |
| 448 | |
| 449 | virtual bool hasIntegratedCPP() const { return false; } |
| 450 | |
| 451 | virtual void ConstructJob(Compilation &C, const JobAction &JA, |
| 452 | const InputInfo &Output, |
| 453 | const InputInfoList &Inputs, |
| 454 | const ArgList &TCArgs, |
| 455 | const char *LinkingOutput) const; |
| 456 | }; |
Rafael Espindola | 92b0093 | 2010-08-10 00:25:48 +0000 | [diff] [blame] | 457 | } |
Chris Lattner | 3e2ee14 | 2010-07-07 16:01:42 +0000 | [diff] [blame] | 458 | /// minix -- Directly call GNU Binutils assembler and linker |
| 459 | namespace minix { |
| 460 | class LLVM_LIBRARY_VISIBILITY Assemble : public Tool { |
| 461 | public: |
| 462 | Assemble(const ToolChain &TC) : Tool("minix::Assemble", "assembler", |
| 463 | TC) {} |
| 464 | |
Chris Lattner | 3e2ee14 | 2010-07-07 16:01:42 +0000 | [diff] [blame] | 465 | virtual bool hasIntegratedCPP() const { return false; } |
| 466 | |
| 467 | virtual void ConstructJob(Compilation &C, const JobAction &JA, |
Chris Lattner | 3e2ee14 | 2010-07-07 16:01:42 +0000 | [diff] [blame] | 468 | const InputInfo &Output, |
| 469 | const InputInfoList &Inputs, |
| 470 | const ArgList &TCArgs, |
| 471 | const char *LinkingOutput) const; |
| 472 | }; |
| 473 | class LLVM_LIBRARY_VISIBILITY Link : public Tool { |
| 474 | public: |
| 475 | Link(const ToolChain &TC) : Tool("minix::Link", "linker", TC) {} |
| 476 | |
Chris Lattner | 3e2ee14 | 2010-07-07 16:01:42 +0000 | [diff] [blame] | 477 | virtual bool hasIntegratedCPP() const { return false; } |
| 478 | |
| 479 | virtual void ConstructJob(Compilation &C, const JobAction &JA, |
Chris Lattner | 3e2ee14 | 2010-07-07 16:01:42 +0000 | [diff] [blame] | 480 | const InputInfo &Output, |
| 481 | const InputInfoList &Inputs, |
| 482 | const ArgList &TCArgs, |
| 483 | const char *LinkingOutput) const; |
| 484 | }; |
| 485 | } // end namespace minix |
| 486 | |
Edward O'Callaghan | 856e4ff | 2009-08-22 01:06:46 +0000 | [diff] [blame] | 487 | /// auroraux -- Directly call GNU Binutils assembler and linker |
| 488 | namespace auroraux { |
Duncan Sands | af260b9 | 2010-05-11 20:16:05 +0000 | [diff] [blame] | 489 | class LLVM_LIBRARY_VISIBILITY Assemble : public Tool { |
Edward O'Callaghan | 856e4ff | 2009-08-22 01:06:46 +0000 | [diff] [blame] | 490 | public: |
Daniel Dunbar | 1cb532c | 2010-05-22 00:37:18 +0000 | [diff] [blame] | 491 | Assemble(const ToolChain &TC) : Tool("auroraux::Assemble", "assembler", |
| 492 | TC) {} |
Edward O'Callaghan | 856e4ff | 2009-08-22 01:06:46 +0000 | [diff] [blame] | 493 | |
Edward O'Callaghan | 856e4ff | 2009-08-22 01:06:46 +0000 | [diff] [blame] | 494 | virtual bool hasIntegratedCPP() const { return false; } |
| 495 | |
| 496 | virtual void ConstructJob(Compilation &C, const JobAction &JA, |
Mike Stump | 11289f4 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 497 | const InputInfo &Output, |
| 498 | const InputInfoList &Inputs, |
| 499 | const ArgList &TCArgs, |
Edward O'Callaghan | 856e4ff | 2009-08-22 01:06:46 +0000 | [diff] [blame] | 500 | const char *LinkingOutput) const; |
| 501 | }; |
Duncan Sands | af260b9 | 2010-05-11 20:16:05 +0000 | [diff] [blame] | 502 | class LLVM_LIBRARY_VISIBILITY Link : public Tool { |
Edward O'Callaghan | 856e4ff | 2009-08-22 01:06:46 +0000 | [diff] [blame] | 503 | public: |
Daniel Dunbar | 1cb532c | 2010-05-22 00:37:18 +0000 | [diff] [blame] | 504 | Link(const ToolChain &TC) : Tool("auroraux::Link", "linker", TC) {} |
Edward O'Callaghan | 856e4ff | 2009-08-22 01:06:46 +0000 | [diff] [blame] | 505 | |
Edward O'Callaghan | 856e4ff | 2009-08-22 01:06:46 +0000 | [diff] [blame] | 506 | virtual bool hasIntegratedCPP() const { return false; } |
| 507 | |
| 508 | virtual void ConstructJob(Compilation &C, const JobAction &JA, |
Mike Stump | 11289f4 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 509 | const InputInfo &Output, |
| 510 | const InputInfoList &Inputs, |
| 511 | const ArgList &TCArgs, |
Edward O'Callaghan | 856e4ff | 2009-08-22 01:06:46 +0000 | [diff] [blame] | 512 | const char *LinkingOutput) const; |
| 513 | }; |
| 514 | } // end namespace auroraux |
Daniel Dunbar | 8eb473c | 2009-03-31 17:45:15 +0000 | [diff] [blame] | 515 | |
Daniel Dunbar | cc91234 | 2009-05-02 18:28:39 +0000 | [diff] [blame] | 516 | /// dragonfly -- Directly call GNU Binutils assembler and linker |
| 517 | namespace dragonfly { |
Duncan Sands | af260b9 | 2010-05-11 20:16:05 +0000 | [diff] [blame] | 518 | class LLVM_LIBRARY_VISIBILITY Assemble : public Tool { |
Daniel Dunbar | cc91234 | 2009-05-02 18:28:39 +0000 | [diff] [blame] | 519 | public: |
Daniel Dunbar | 1cb532c | 2010-05-22 00:37:18 +0000 | [diff] [blame] | 520 | Assemble(const ToolChain &TC) : Tool("dragonfly::Assemble", "assembler", |
| 521 | TC) {} |
Daniel Dunbar | cc91234 | 2009-05-02 18:28:39 +0000 | [diff] [blame] | 522 | |
Daniel Dunbar | cc91234 | 2009-05-02 18:28:39 +0000 | [diff] [blame] | 523 | virtual bool hasIntegratedCPP() const { return false; } |
| 524 | |
| 525 | virtual void ConstructJob(Compilation &C, const JobAction &JA, |
Mike Stump | 11289f4 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 526 | const InputInfo &Output, |
| 527 | const InputInfoList &Inputs, |
| 528 | const ArgList &TCArgs, |
Daniel Dunbar | cc91234 | 2009-05-02 18:28:39 +0000 | [diff] [blame] | 529 | const char *LinkingOutput) const; |
| 530 | }; |
Duncan Sands | af260b9 | 2010-05-11 20:16:05 +0000 | [diff] [blame] | 531 | class LLVM_LIBRARY_VISIBILITY Link : public Tool { |
Daniel Dunbar | cc91234 | 2009-05-02 18:28:39 +0000 | [diff] [blame] | 532 | public: |
Daniel Dunbar | 1cb532c | 2010-05-22 00:37:18 +0000 | [diff] [blame] | 533 | Link(const ToolChain &TC) : Tool("dragonfly::Link", "linker", TC) {} |
Daniel Dunbar | cc91234 | 2009-05-02 18:28:39 +0000 | [diff] [blame] | 534 | |
Daniel Dunbar | cc91234 | 2009-05-02 18:28:39 +0000 | [diff] [blame] | 535 | virtual bool hasIntegratedCPP() const { return false; } |
| 536 | |
| 537 | virtual void ConstructJob(Compilation &C, const JobAction &JA, |
Mike Stump | 11289f4 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 538 | const InputInfo &Output, |
| 539 | const InputInfoList &Inputs, |
| 540 | const ArgList &TCArgs, |
Daniel Dunbar | cc91234 | 2009-05-02 18:28:39 +0000 | [diff] [blame] | 541 | const char *LinkingOutput) const; |
| 542 | }; |
Edward O'Callaghan | 856e4ff | 2009-08-22 01:06:46 +0000 | [diff] [blame] | 543 | } // end namespace dragonfly |
Daniel Dunbar | cc91234 | 2009-05-02 18:28:39 +0000 | [diff] [blame] | 544 | |
Michael J. Spencer | b186bc3 | 2010-08-21 21:55:07 +0000 | [diff] [blame] | 545 | /// Visual studio tools. |
| 546 | namespace visualstudio { |
| 547 | class LLVM_LIBRARY_VISIBILITY Link : public Tool { |
| 548 | public: |
| 549 | Link(const ToolChain &TC) : Tool("visualstudio::Link", "linker", TC) {} |
| 550 | |
| 551 | virtual bool hasIntegratedCPP() const { return false; } |
| 552 | |
| 553 | virtual void ConstructJob(Compilation &C, const JobAction &JA, |
| 554 | const InputInfo &Output, |
| 555 | const InputInfoList &Inputs, |
| 556 | const ArgList &TCArgs, |
| 557 | const char *LinkingOutput) const; |
| 558 | }; |
| 559 | } // end namespace visualstudio |
| 560 | |
Daniel Dunbar | 5903d8c | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 561 | } // end namespace toolchains |
| 562 | } // end namespace driver |
| 563 | } // end namespace clang |
| 564 | |
Edward O'Callaghan | 856e4ff | 2009-08-22 01:06:46 +0000 | [diff] [blame] | 565 | #endif // CLANG_LIB_DRIVER_TOOLS_H_ |