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