Tools.h revision 651f13cea278ec967336033dd032faef0e9fc2ec
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" 14#include "clang/Driver/Types.h" 15#include "clang/Driver/Util.h" 16#include "llvm/ADT/Triple.h" 17#include "llvm/Option/Option.h" 18#include "llvm/Support/Compiler.h" 19 20namespace clang { 21 class ObjCRuntime; 22 23namespace driver { 24 class Command; 25 class Driver; 26 27namespace toolchains { 28 class MachO; 29} 30 31namespace tools { 32using llvm::opt::ArgStringList; 33 34 /// \brief Clang compiler tool. 35 class LLVM_LIBRARY_VISIBILITY Clang : public Tool { 36 public: 37 static const char *getBaseInputName(const llvm::opt::ArgList &Args, 38 const InputInfoList &Inputs); 39 static const char *getBaseInputStem(const llvm::opt::ArgList &Args, 40 const InputInfoList &Inputs); 41 static const char *getDependencyFileName(const llvm::opt::ArgList &Args, 42 const InputInfoList &Inputs); 43 44 private: 45 void AddPreprocessingOptions(Compilation &C, const JobAction &JA, 46 const Driver &D, 47 const llvm::opt::ArgList &Args, 48 llvm::opt::ArgStringList &CmdArgs, 49 const InputInfo &Output, 50 const InputInfoList &Inputs) const; 51 52 void AddAArch64TargetArgs(const llvm::opt::ArgList &Args, 53 llvm::opt::ArgStringList &CmdArgs) const; 54 void AddARMTargetArgs(const llvm::opt::ArgList &Args, 55 llvm::opt::ArgStringList &CmdArgs, 56 bool KernelOrKext) const; 57 void AddARM64TargetArgs(const llvm::opt::ArgList &Args, 58 llvm::opt::ArgStringList &CmdArgs) const; 59 void AddMIPSTargetArgs(const llvm::opt::ArgList &Args, 60 llvm::opt::ArgStringList &CmdArgs) const; 61 void AddR600TargetArgs(const llvm::opt::ArgList &Args, 62 llvm::opt::ArgStringList &CmdArgs) const; 63 void AddSparcTargetArgs(const llvm::opt::ArgList &Args, 64 llvm::opt::ArgStringList &CmdArgs) const; 65 void AddSystemZTargetArgs(const llvm::opt::ArgList &Args, 66 llvm::opt::ArgStringList &CmdArgs) const; 67 void AddX86TargetArgs(const llvm::opt::ArgList &Args, 68 llvm::opt::ArgStringList &CmdArgs) const; 69 void AddHexagonTargetArgs(const llvm::opt::ArgList &Args, 70 llvm::opt::ArgStringList &CmdArgs) const; 71 72 enum RewriteKind { RK_None, RK_Fragile, RK_NonFragile }; 73 74 ObjCRuntime AddObjCRuntimeArgs(const llvm::opt::ArgList &args, 75 llvm::opt::ArgStringList &cmdArgs, 76 RewriteKind rewrite) const; 77 78 void AddClangCLArgs(const llvm::opt::ArgList &Args, 79 llvm::opt::ArgStringList &CmdArgs) const; 80 81 public: 82 Clang(const ToolChain &TC) : Tool("clang", "clang frontend", TC) {} 83 84 bool hasGoodDiagnostics() const override { return true; } 85 bool hasIntegratedAssembler() const override { return true; } 86 bool hasIntegratedCPP() const override { return true; } 87 88 void ConstructJob(Compilation &C, const JobAction &JA, 89 const InputInfo &Output, const InputInfoList &Inputs, 90 const llvm::opt::ArgList &TCArgs, 91 const char *LinkingOutput) const override; 92 }; 93 94 /// \brief Clang integrated assembler tool. 95 class LLVM_LIBRARY_VISIBILITY ClangAs : public Tool { 96 public: 97 ClangAs(const ToolChain &TC) : Tool("clang::as", 98 "clang integrated assembler", TC) {} 99 100 bool hasGoodDiagnostics() const override { return true; } 101 bool hasIntegratedAssembler() const override { return false; } 102 bool hasIntegratedCPP() const override { return false; } 103 104 void ConstructJob(Compilation &C, const JobAction &JA, 105 const InputInfo &Output, const InputInfoList &Inputs, 106 const llvm::opt::ArgList &TCArgs, 107 const char *LinkingOutput) const override; 108 }; 109 110 /// gcc - Generic GCC tool implementations. 111namespace gcc { 112 class LLVM_LIBRARY_VISIBILITY Common : public Tool { 113 public: 114 Common(const char *Name, const char *ShortName, 115 const ToolChain &TC) : Tool(Name, ShortName, TC) {} 116 117 void ConstructJob(Compilation &C, const JobAction &JA, 118 const InputInfo &Output, 119 const InputInfoList &Inputs, 120 const llvm::opt::ArgList &TCArgs, 121 const char *LinkingOutput) const override; 122 123 /// RenderExtraToolArgs - Render any arguments necessary to force 124 /// the particular tool mode. 125 virtual void 126 RenderExtraToolArgs(const JobAction &JA, 127 llvm::opt::ArgStringList &CmdArgs) const = 0; 128 }; 129 130 class LLVM_LIBRARY_VISIBILITY Preprocess : public Common { 131 public: 132 Preprocess(const ToolChain &TC) : Common("gcc::Preprocess", 133 "gcc preprocessor", TC) {} 134 135 bool hasGoodDiagnostics() const override { return true; } 136 bool hasIntegratedCPP() const override { return false; } 137 138 void RenderExtraToolArgs(const JobAction &JA, 139 llvm::opt::ArgStringList &CmdArgs) const override; 140 }; 141 142 class LLVM_LIBRARY_VISIBILITY Compile : public Common { 143 public: 144 Compile(const ToolChain &TC) : Common("gcc::Compile", 145 "gcc frontend", TC) {} 146 147 bool hasGoodDiagnostics() const override { return true; } 148 bool hasIntegratedCPP() const override { return true; } 149 150 void RenderExtraToolArgs(const JobAction &JA, 151 llvm::opt::ArgStringList &CmdArgs) const override; 152 }; 153 154 class LLVM_LIBRARY_VISIBILITY Link : public Common { 155 public: 156 Link(const ToolChain &TC) : Common("gcc::Link", 157 "linker (via gcc)", TC) {} 158 159 bool hasIntegratedCPP() const override { return false; } 160 bool isLinkJob() const override { return true; } 161 162 void RenderExtraToolArgs(const JobAction &JA, 163 llvm::opt::ArgStringList &CmdArgs) const override; 164 }; 165} // end namespace gcc 166 167namespace hexagon { 168 // For Hexagon, we do not need to instantiate tools for PreProcess, PreCompile and Compile. 169 // We simply use "clang -cc1" for those actions. 170 class LLVM_LIBRARY_VISIBILITY Assemble : public Tool { 171 public: 172 Assemble(const ToolChain &TC) : Tool("hexagon::Assemble", 173 "hexagon-as", TC) {} 174 175 bool hasIntegratedCPP() const override { return false; } 176 177 void RenderExtraToolArgs(const JobAction &JA, 178 llvm::opt::ArgStringList &CmdArgs) const; 179 void ConstructJob(Compilation &C, const JobAction &JA, 180 const InputInfo &Output, const InputInfoList &Inputs, 181 const llvm::opt::ArgList &TCArgs, 182 const char *LinkingOutput) const override; 183 }; 184 185 class LLVM_LIBRARY_VISIBILITY Link : public Tool { 186 public: 187 Link(const ToolChain &TC) : Tool("hexagon::Link", 188 "hexagon-ld", TC) {} 189 190 bool hasIntegratedCPP() const override { return false; } 191 bool isLinkJob() const override { return true; } 192 193 virtual void RenderExtraToolArgs(const JobAction &JA, 194 llvm::opt::ArgStringList &CmdArgs) const; 195 void ConstructJob(Compilation &C, const JobAction &JA, 196 const InputInfo &Output, const InputInfoList &Inputs, 197 const llvm::opt::ArgList &TCArgs, 198 const char *LinkingOutput) const override; 199 }; 200} // end namespace hexagon. 201 202namespace arm { 203 StringRef getARMTargetCPU(const llvm::opt::ArgList &Args, 204 const llvm::Triple &Triple); 205 const char* getARMCPUForMArch(const llvm::opt::ArgList &Args, 206 const llvm::Triple &Triple); 207 const char* getLLVMArchSuffixForARM(StringRef CPU); 208} 209 210namespace mips { 211 bool hasMipsAbiArg(const llvm::opt::ArgList &Args, const char *Value); 212} 213 214namespace darwin { 215 llvm::Triple::ArchType getArchTypeForMachOArchName(StringRef Str); 216 void setTripleTypeForMachOArchName(llvm::Triple &T, StringRef Str); 217 218 class LLVM_LIBRARY_VISIBILITY MachOTool : public Tool { 219 virtual void anchor(); 220 protected: 221 void AddMachOArch(const llvm::opt::ArgList &Args, 222 llvm::opt::ArgStringList &CmdArgs) const; 223 224 const toolchains::MachO &getMachOToolChain() const { 225 return reinterpret_cast<const toolchains::MachO&>(getToolChain()); 226 } 227 228 public: 229 MachOTool(const char *Name, const char *ShortName, 230 const ToolChain &TC) : Tool(Name, ShortName, TC) {} 231 }; 232 233 class LLVM_LIBRARY_VISIBILITY Assemble : public MachOTool { 234 public: 235 Assemble(const ToolChain &TC) : MachOTool("darwin::Assemble", 236 "assembler", TC) {} 237 238 bool hasIntegratedCPP() const override { return false; } 239 240 void ConstructJob(Compilation &C, const JobAction &JA, 241 const InputInfo &Output, const InputInfoList &Inputs, 242 const llvm::opt::ArgList &TCArgs, 243 const char *LinkingOutput) const override; 244 }; 245 246 class LLVM_LIBRARY_VISIBILITY Link : public MachOTool { 247 bool NeedsTempPath(const InputInfoList &Inputs) const; 248 void AddLinkArgs(Compilation &C, const llvm::opt::ArgList &Args, 249 llvm::opt::ArgStringList &CmdArgs, 250 const InputInfoList &Inputs) const; 251 252 public: 253 Link(const ToolChain &TC) : MachOTool("darwin::Link", "linker", TC) {} 254 255 bool hasIntegratedCPP() const override { return false; } 256 bool isLinkJob() const override { return true; } 257 258 void ConstructJob(Compilation &C, const JobAction &JA, 259 const InputInfo &Output, const InputInfoList &Inputs, 260 const llvm::opt::ArgList &TCArgs, 261 const char *LinkingOutput) const override; 262 }; 263 264 class LLVM_LIBRARY_VISIBILITY Lipo : public MachOTool { 265 public: 266 Lipo(const ToolChain &TC) : MachOTool("darwin::Lipo", "lipo", TC) {} 267 268 bool hasIntegratedCPP() const override { return false; } 269 270 void ConstructJob(Compilation &C, const JobAction &JA, 271 const InputInfo &Output, const InputInfoList &Inputs, 272 const llvm::opt::ArgList &TCArgs, 273 const char *LinkingOutput) const override; 274 }; 275 276 class LLVM_LIBRARY_VISIBILITY Dsymutil : public MachOTool { 277 public: 278 Dsymutil(const ToolChain &TC) : MachOTool("darwin::Dsymutil", 279 "dsymutil", TC) {} 280 281 bool hasIntegratedCPP() const override { return false; } 282 bool isDsymutilJob() const override { return true; } 283 284 void ConstructJob(Compilation &C, const JobAction &JA, 285 const InputInfo &Output, 286 const InputInfoList &Inputs, 287 const llvm::opt::ArgList &TCArgs, 288 const char *LinkingOutput) const override; 289 }; 290 291 class LLVM_LIBRARY_VISIBILITY VerifyDebug : public MachOTool { 292 public: 293 VerifyDebug(const ToolChain &TC) : MachOTool("darwin::VerifyDebug", 294 "dwarfdump", TC) {} 295 296 bool hasIntegratedCPP() const override { return false; } 297 298 void ConstructJob(Compilation &C, const JobAction &JA, 299 const InputInfo &Output, const InputInfoList &Inputs, 300 const llvm::opt::ArgList &TCArgs, 301 const char *LinkingOutput) const override; 302 }; 303 304} 305 306 /// openbsd -- Directly call GNU Binutils assembler and linker 307namespace openbsd { 308 class LLVM_LIBRARY_VISIBILITY Assemble : public Tool { 309 public: 310 Assemble(const ToolChain &TC) : Tool("openbsd::Assemble", "assembler", 311 TC) {} 312 313 bool hasIntegratedCPP() const override { return false; } 314 315 void ConstructJob(Compilation &C, const JobAction &JA, 316 const InputInfo &Output, 317 const InputInfoList &Inputs, 318 const llvm::opt::ArgList &TCArgs, 319 const char *LinkingOutput) const override; 320 }; 321 class LLVM_LIBRARY_VISIBILITY Link : public Tool { 322 public: 323 Link(const ToolChain &TC) : Tool("openbsd::Link", "linker", TC) {} 324 325 bool hasIntegratedCPP() const override { return false; } 326 bool isLinkJob() const override { return true; } 327 328 void ConstructJob(Compilation &C, const JobAction &JA, 329 const InputInfo &Output, const InputInfoList &Inputs, 330 const llvm::opt::ArgList &TCArgs, 331 const char *LinkingOutput) const override; 332 }; 333} // end namespace openbsd 334 335 /// bitrig -- Directly call GNU Binutils assembler and linker 336namespace bitrig { 337 class LLVM_LIBRARY_VISIBILITY Assemble : public Tool { 338 public: 339 Assemble(const ToolChain &TC) : Tool("bitrig::Assemble", "assembler", 340 TC) {} 341 342 bool hasIntegratedCPP() const override { return false; } 343 344 void ConstructJob(Compilation &C, const JobAction &JA, 345 const InputInfo &Output, const InputInfoList &Inputs, 346 const llvm::opt::ArgList &TCArgs, 347 const char *LinkingOutput) const override; 348 }; 349 class LLVM_LIBRARY_VISIBILITY Link : public Tool { 350 public: 351 Link(const ToolChain &TC) : Tool("bitrig::Link", "linker", TC) {} 352 353 bool hasIntegratedCPP() const override { return false; } 354 bool isLinkJob() const override { return true; } 355 356 void ConstructJob(Compilation &C, const JobAction &JA, 357 const InputInfo &Output, const InputInfoList &Inputs, 358 const llvm::opt::ArgList &TCArgs, 359 const char *LinkingOutput) const override; 360 }; 361} // end namespace bitrig 362 363 /// freebsd -- Directly call GNU Binutils assembler and linker 364namespace freebsd { 365 class LLVM_LIBRARY_VISIBILITY Assemble : public Tool { 366 public: 367 Assemble(const ToolChain &TC) : Tool("freebsd::Assemble", "assembler", 368 TC) {} 369 370 bool hasIntegratedCPP() const override { return false; } 371 372 void ConstructJob(Compilation &C, const JobAction &JA, 373 const InputInfo &Output, const InputInfoList &Inputs, 374 const llvm::opt::ArgList &TCArgs, 375 const char *LinkingOutput) const override; 376 }; 377 class LLVM_LIBRARY_VISIBILITY Link : public Tool { 378 public: 379 Link(const ToolChain &TC) : Tool("freebsd::Link", "linker", TC) {} 380 381 bool hasIntegratedCPP() const override { return false; } 382 bool isLinkJob() const override { return true; } 383 384 void ConstructJob(Compilation &C, const JobAction &JA, 385 const InputInfo &Output, const InputInfoList &Inputs, 386 const llvm::opt::ArgList &TCArgs, 387 const char *LinkingOutput) const override; 388 }; 389} // end namespace freebsd 390 391 /// netbsd -- Directly call GNU Binutils assembler and linker 392namespace netbsd { 393 class LLVM_LIBRARY_VISIBILITY Assemble : public Tool { 394 395 public: 396 Assemble(const ToolChain &TC) 397 : Tool("netbsd::Assemble", "assembler", TC) {} 398 399 bool hasIntegratedCPP() const override { return false; } 400 401 void ConstructJob(Compilation &C, const JobAction &JA, 402 const InputInfo &Output, const InputInfoList &Inputs, 403 const llvm::opt::ArgList &TCArgs, 404 const char *LinkingOutput) const override; 405 }; 406 class LLVM_LIBRARY_VISIBILITY Link : public Tool { 407 408 public: 409 Link(const ToolChain &TC) 410 : Tool("netbsd::Link", "linker", TC) {} 411 412 bool hasIntegratedCPP() const override { return false; } 413 bool isLinkJob() const override { return true; } 414 415 void ConstructJob(Compilation &C, const JobAction &JA, 416 const InputInfo &Output, const InputInfoList &Inputs, 417 const llvm::opt::ArgList &TCArgs, 418 const char *LinkingOutput) const override; 419 }; 420} // end namespace netbsd 421 422 /// Directly call GNU Binutils' assembler and linker. 423namespace gnutools { 424 class LLVM_LIBRARY_VISIBILITY Assemble : public Tool { 425 public: 426 Assemble(const ToolChain &TC) : Tool("GNU::Assemble", "assembler", TC) {} 427 428 bool hasIntegratedCPP() const override { return false; } 429 430 void ConstructJob(Compilation &C, const JobAction &JA, 431 const InputInfo &Output, 432 const InputInfoList &Inputs, 433 const llvm::opt::ArgList &TCArgs, 434 const char *LinkingOutput) const override; 435 }; 436 class LLVM_LIBRARY_VISIBILITY Link : public Tool { 437 public: 438 Link(const ToolChain &TC) : Tool("GNU::Link", "linker", TC) {} 439 440 bool hasIntegratedCPP() const override { return false; } 441 bool isLinkJob() const override { return true; } 442 443 void ConstructJob(Compilation &C, const JobAction &JA, 444 const InputInfo &Output, 445 const InputInfoList &Inputs, 446 const llvm::opt::ArgList &TCArgs, 447 const char *LinkingOutput) const override; 448 }; 449} 450 /// minix -- Directly call GNU Binutils assembler and linker 451namespace minix { 452 class LLVM_LIBRARY_VISIBILITY Assemble : public Tool { 453 public: 454 Assemble(const ToolChain &TC) : Tool("minix::Assemble", "assembler", 455 TC) {} 456 457 bool hasIntegratedCPP() const override { return false; } 458 459 void ConstructJob(Compilation &C, const JobAction &JA, 460 const InputInfo &Output, 461 const InputInfoList &Inputs, 462 const llvm::opt::ArgList &TCArgs, 463 const char *LinkingOutput) const override; 464 }; 465 class LLVM_LIBRARY_VISIBILITY Link : public Tool { 466 public: 467 Link(const ToolChain &TC) : Tool("minix::Link", "linker", TC) {} 468 469 bool hasIntegratedCPP() const override { return false; } 470 bool isLinkJob() const override { return true; } 471 472 void ConstructJob(Compilation &C, const JobAction &JA, 473 const InputInfo &Output, 474 const InputInfoList &Inputs, 475 const llvm::opt::ArgList &TCArgs, 476 const char *LinkingOutput) const override; 477 }; 478} // end namespace minix 479 480 /// solaris -- Directly call Solaris assembler and linker 481namespace solaris { 482 class LLVM_LIBRARY_VISIBILITY Assemble : public Tool { 483 public: 484 Assemble(const ToolChain &TC) : Tool("solaris::Assemble", "assembler", 485 TC) {} 486 487 bool hasIntegratedCPP() const override { return false; } 488 489 void ConstructJob(Compilation &C, const JobAction &JA, 490 const InputInfo &Output, const InputInfoList &Inputs, 491 const llvm::opt::ArgList &TCArgs, 492 const char *LinkingOutput) const override; 493 }; 494 class LLVM_LIBRARY_VISIBILITY Link : public Tool { 495 public: 496 Link(const ToolChain &TC) : Tool("solaris::Link", "linker", TC) {} 497 498 bool hasIntegratedCPP() const override { return false; } 499 bool isLinkJob() const override { return true; } 500 501 void ConstructJob(Compilation &C, const JobAction &JA, 502 const InputInfo &Output, const InputInfoList &Inputs, 503 const llvm::opt::ArgList &TCArgs, 504 const char *LinkingOutput) const override; 505 }; 506} // end namespace solaris 507 508 /// auroraux -- Directly call GNU Binutils assembler and linker 509namespace auroraux { 510 class LLVM_LIBRARY_VISIBILITY Assemble : public Tool { 511 public: 512 Assemble(const ToolChain &TC) : Tool("auroraux::Assemble", "assembler", 513 TC) {} 514 515 bool hasIntegratedCPP() const override { return false; } 516 517 void ConstructJob(Compilation &C, const JobAction &JA, 518 const InputInfo &Output, const InputInfoList &Inputs, 519 const llvm::opt::ArgList &TCArgs, 520 const char *LinkingOutput) const override; 521 }; 522 class LLVM_LIBRARY_VISIBILITY Link : public Tool { 523 public: 524 Link(const ToolChain &TC) : Tool("auroraux::Link", "linker", TC) {} 525 526 bool hasIntegratedCPP() const override { return false; } 527 bool isLinkJob() const override { return true; } 528 529 void ConstructJob(Compilation &C, const JobAction &JA, 530 const InputInfo &Output, const InputInfoList &Inputs, 531 const llvm::opt::ArgList &TCArgs, 532 const char *LinkingOutput) const override; 533 }; 534} // end namespace auroraux 535 536 /// dragonfly -- Directly call GNU Binutils assembler and linker 537namespace dragonfly { 538 class LLVM_LIBRARY_VISIBILITY Assemble : public Tool { 539 public: 540 Assemble(const ToolChain &TC) : Tool("dragonfly::Assemble", "assembler", 541 TC) {} 542 543 bool hasIntegratedCPP() const override { return false; } 544 545 void ConstructJob(Compilation &C, const JobAction &JA, 546 const InputInfo &Output, const InputInfoList &Inputs, 547 const llvm::opt::ArgList &TCArgs, 548 const char *LinkingOutput) const override; 549 }; 550 class LLVM_LIBRARY_VISIBILITY Link : public Tool { 551 public: 552 Link(const ToolChain &TC) : Tool("dragonfly::Link", "linker", TC) {} 553 554 bool hasIntegratedCPP() const override { return false; } 555 bool isLinkJob() const override { return true; } 556 557 void ConstructJob(Compilation &C, const JobAction &JA, 558 const InputInfo &Output, 559 const InputInfoList &Inputs, 560 const llvm::opt::ArgList &TCArgs, 561 const char *LinkingOutput) const override; 562 }; 563} // end namespace dragonfly 564 565 /// Visual studio tools. 566namespace visualstudio { 567 class LLVM_LIBRARY_VISIBILITY Link : public Tool { 568 public: 569 Link(const ToolChain &TC) : Tool("visualstudio::Link", "linker", TC) {} 570 571 bool hasIntegratedCPP() const override { return false; } 572 bool isLinkJob() const override { return true; } 573 574 void ConstructJob(Compilation &C, const JobAction &JA, 575 const InputInfo &Output, const InputInfoList &Inputs, 576 const llvm::opt::ArgList &TCArgs, 577 const char *LinkingOutput) const override; 578 }; 579 580 class LLVM_LIBRARY_VISIBILITY Compile : public Tool { 581 public: 582 Compile(const ToolChain &TC) : Tool("visualstudio::Compile", "compiler", TC) {} 583 584 bool hasIntegratedAssembler() const override { return true; } 585 bool hasIntegratedCPP() const override { return true; } 586 bool isLinkJob() const override { return false; } 587 588 void ConstructJob(Compilation &C, const JobAction &JA, 589 const InputInfo &Output, const InputInfoList &Inputs, 590 const llvm::opt::ArgList &TCArgs, 591 const char *LinkingOutput) const override; 592 593 Command *GetCommand(Compilation &C, const JobAction &JA, 594 const InputInfo &Output, 595 const InputInfoList &Inputs, 596 const llvm::opt::ArgList &TCArgs, 597 const char *LinkingOutput) const; 598 }; 599} // end namespace visualstudio 600 601namespace arm { 602 StringRef getARMFloatABI(const Driver &D, const llvm::opt::ArgList &Args, 603 const llvm::Triple &Triple); 604} 605namespace XCore { 606 // For XCore, we do not need to instantiate tools for PreProcess, PreCompile and Compile. 607 // We simply use "clang -cc1" for those actions. 608 class LLVM_LIBRARY_VISIBILITY Assemble : public Tool { 609 public: 610 Assemble(const ToolChain &TC) : Tool("XCore::Assemble", 611 "XCore-as", TC) {} 612 613 bool hasIntegratedCPP() const override { return false; } 614 void ConstructJob(Compilation &C, const JobAction &JA, 615 const InputInfo &Output, const InputInfoList &Inputs, 616 const llvm::opt::ArgList &TCArgs, 617 const char *LinkingOutput) const override; 618 }; 619 620 class LLVM_LIBRARY_VISIBILITY Link : public Tool { 621 public: 622 Link(const ToolChain &TC) : Tool("XCore::Link", 623 "XCore-ld", TC) {} 624 625 bool hasIntegratedCPP() const override { return false; } 626 bool isLinkJob() const override { return true; } 627 void ConstructJob(Compilation &C, const JobAction &JA, 628 const InputInfo &Output, const InputInfoList &Inputs, 629 const llvm::opt::ArgList &TCArgs, 630 const char *LinkingOutput) const override; 631 }; 632} // end namespace XCore. 633 634 635} // end namespace toolchains 636} // end namespace driver 637} // end namespace clang 638 639#endif // CLANG_LIB_DRIVER_TOOLS_H_ 640