Minix.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. //===--- Minix.h - Minix 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_MINIX_H
  9. #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_MINIX_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. /// minix -- Directly call GNU Binutils assembler and linker
  17. namespace minix {
  18. class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
  19. public:
  20. Assembler(const ToolChain &TC) : Tool("minix::Assembler", "assembler", TC) {}
  21. bool hasIntegratedCPP() const override { return false; }
  22. void ConstructJob(Compilation &C, const JobAction &JA,
  23. const InputInfo &Output, const InputInfoList &Inputs,
  24. const llvm::opt::ArgList &TCArgs,
  25. const char *LinkingOutput) const override;
  26. };
  27. class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
  28. public:
  29. Linker(const ToolChain &TC) : Tool("minix::Linker", "linker", TC) {}
  30. bool hasIntegratedCPP() const override { return false; }
  31. bool isLinkJob() const override { return true; }
  32. void ConstructJob(Compilation &C, const JobAction &JA,
  33. const InputInfo &Output, const InputInfoList &Inputs,
  34. const llvm::opt::ArgList &TCArgs,
  35. const char *LinkingOutput) const override;
  36. };
  37. } // end namespace minix
  38. } // end namespace tools
  39. namespace toolchains {
  40. class LLVM_LIBRARY_VISIBILITY Minix : public Generic_ELF {
  41. public:
  42. Minix(const Driver &D, const llvm::Triple &Triple,
  43. const llvm::opt::ArgList &Args);
  44. protected:
  45. Tool *buildAssembler() const override;
  46. Tool *buildLinker() const override;
  47. };
  48. } // end namespace toolchains
  49. } // end namespace driver
  50. } // end namespace clang
  51. #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_MINIX_H