MipsLinux.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. //===--- Mips.h - Mips 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_MIPS_LINUX_H
  9. #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_MIPS_LINUX_H
  10. #include "Linux.h"
  11. #include "clang/Driver/ToolChain.h"
  12. namespace clang {
  13. namespace driver {
  14. namespace toolchains {
  15. class LLVM_LIBRARY_VISIBILITY MipsLLVMToolChain : public Linux {
  16. protected:
  17. Tool *buildLinker() const override;
  18. public:
  19. MipsLLVMToolChain(const Driver &D, const llvm::Triple &Triple,
  20. const llvm::opt::ArgList &Args);
  21. void
  22. AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs,
  23. llvm::opt::ArgStringList &CC1Args) const override;
  24. CXXStdlibType GetCXXStdlibType(const llvm::opt::ArgList &Args) const override;
  25. void addLibCxxIncludePaths(
  26. const llvm::opt::ArgList &DriverArgs,
  27. llvm::opt::ArgStringList &CC1Args) const override;
  28. void AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args,
  29. llvm::opt::ArgStringList &CmdArgs) const override;
  30. std::string
  31. getCompilerRT(const llvm::opt::ArgList &Args, StringRef Component,
  32. FileType Type = ToolChain::FT_Static) const override;
  33. std::string computeSysRoot() const override;
  34. RuntimeLibType GetDefaultRuntimeLibType() const override {
  35. return GCCInstallation.isValid() ? RuntimeLibType::RLT_Libgcc
  36. : RuntimeLibType::RLT_CompilerRT;
  37. }
  38. const char *getDefaultLinker() const override {
  39. return "ld.lld";
  40. }
  41. private:
  42. Multilib SelectedMultilib;
  43. std::string LibSuffix;
  44. };
  45. } // end namespace toolchains
  46. } // end namespace driver
  47. } // end namespace clang
  48. #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_MIPS_LINUX_H