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