DragonFly.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. //===--- DragonFly.h - DragonFly ToolChain Implementations ------*- C++ -*-===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. #ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_DRAGONFLY_H
  9. #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_DRAGONFLY_H
  10. #include "Gnu.h"
  11. #include "clang/Driver/Tool.h"
  12. #include "clang/Driver/ToolChain.h"
  13. namespace clang {
  14. namespace driver {
  15. namespace tools {
  16. /// dragonfly -- Directly call GNU Binutils assembler and linker
  17. namespace dragonfly {
  18. class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
  19. public:
  20. Assembler(const ToolChain &TC)
  21. : Tool("dragonfly::Assembler", "assembler", TC) {}
  22. bool hasIntegratedCPP() const override { return false; }
  23. void ConstructJob(Compilation &C, const JobAction &JA,
  24. const InputInfo &Output, const InputInfoList &Inputs,
  25. const llvm::opt::ArgList &TCArgs,
  26. const char *LinkingOutput) const override;
  27. };
  28. class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
  29. public:
  30. Linker(const ToolChain &TC) : Tool("dragonfly::Linker", "linker", TC) {}
  31. bool hasIntegratedCPP() const override { return false; }
  32. bool isLinkJob() const override { return true; }
  33. void ConstructJob(Compilation &C, const JobAction &JA,
  34. const InputInfo &Output, const InputInfoList &Inputs,
  35. const llvm::opt::ArgList &TCArgs,
  36. const char *LinkingOutput) const override;
  37. };
  38. } // end namespace dragonfly
  39. } // end namespace tools
  40. namespace toolchains {
  41. class LLVM_LIBRARY_VISIBILITY DragonFly : public Generic_ELF {
  42. public:
  43. DragonFly(const Driver &D, const llvm::Triple &Triple,
  44. const llvm::opt::ArgList &Args);
  45. bool IsMathErrnoDefault() const override { return false; }
  46. protected:
  47. Tool *buildAssembler() const override;
  48. Tool *buildLinker() const override;
  49. };
  50. } // end namespace toolchains
  51. } // end namespace driver
  52. } // end namespace clang
  53. #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_DRAGONFLY_H