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