17330f729Sjoerg //===--- Ananas.h - Ananas ToolChain Implementations --------*- C++ -*-===// 27330f729Sjoerg // 37330f729Sjoerg // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 47330f729Sjoerg // See https://llvm.org/LICENSE.txt for license information. 57330f729Sjoerg // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 67330f729Sjoerg // 77330f729Sjoerg //===----------------------------------------------------------------------===// 87330f729Sjoerg 97330f729Sjoerg #ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ANANAS_H 107330f729Sjoerg #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ANANAS_H 117330f729Sjoerg 127330f729Sjoerg #include "Gnu.h" 137330f729Sjoerg #include "clang/Driver/Tool.h" 147330f729Sjoerg #include "clang/Driver/ToolChain.h" 157330f729Sjoerg 167330f729Sjoerg namespace clang { 177330f729Sjoerg namespace driver { 187330f729Sjoerg namespace tools { 197330f729Sjoerg 207330f729Sjoerg /// ananas -- Directly call GNU Binutils assembler and linker 217330f729Sjoerg namespace ananas { 22*e038c9c4Sjoerg class LLVM_LIBRARY_VISIBILITY Assembler : public Tool { 237330f729Sjoerg public: Assembler(const ToolChain & TC)24*e038c9c4Sjoerg Assembler(const ToolChain &TC) : Tool("ananas::Assembler", "assembler", TC) {} 257330f729Sjoerg hasIntegratedCPP()267330f729Sjoerg bool hasIntegratedCPP() const override { return false; } 277330f729Sjoerg 287330f729Sjoerg void ConstructJob(Compilation &C, const JobAction &JA, 297330f729Sjoerg const InputInfo &Output, const InputInfoList &Inputs, 307330f729Sjoerg const llvm::opt::ArgList &TCArgs, 317330f729Sjoerg const char *LinkingOutput) const override; 327330f729Sjoerg }; 337330f729Sjoerg 34*e038c9c4Sjoerg class LLVM_LIBRARY_VISIBILITY Linker : public Tool { 357330f729Sjoerg public: Linker(const ToolChain & TC)36*e038c9c4Sjoerg Linker(const ToolChain &TC) : Tool("ananas::Linker", "linker", TC) {} 377330f729Sjoerg hasIntegratedCPP()387330f729Sjoerg bool hasIntegratedCPP() const override { return false; } isLinkJob()397330f729Sjoerg bool isLinkJob() const override { return true; } 407330f729Sjoerg 417330f729Sjoerg void ConstructJob(Compilation &C, const JobAction &JA, 427330f729Sjoerg const InputInfo &Output, const InputInfoList &Inputs, 437330f729Sjoerg const llvm::opt::ArgList &TCArgs, 447330f729Sjoerg const char *LinkingOutput) const override; 457330f729Sjoerg }; 467330f729Sjoerg } // end namespace ananas 477330f729Sjoerg } // end namespace tools 487330f729Sjoerg 497330f729Sjoerg namespace toolchains { 507330f729Sjoerg 517330f729Sjoerg class LLVM_LIBRARY_VISIBILITY Ananas : public Generic_ELF { 527330f729Sjoerg public: 537330f729Sjoerg Ananas(const Driver &D, const llvm::Triple &Triple, 547330f729Sjoerg const llvm::opt::ArgList &Args); 557330f729Sjoerg 567330f729Sjoerg protected: 577330f729Sjoerg Tool *buildAssembler() const override; 587330f729Sjoerg Tool *buildLinker() const override; 597330f729Sjoerg }; 607330f729Sjoerg 617330f729Sjoerg } // end namespace toolchains 627330f729Sjoerg } // end namespace driver 637330f729Sjoerg } // end namespace clang 647330f729Sjoerg 657330f729Sjoerg #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_ANANAS_H 66