xref: /netbsd-src/external/apache2/llvm/dist/clang/lib/Driver/ToolChains/MipsLinux.h (revision 7330f729ccf0bd976a06f95fad452fe774fc7fd1)
1*7330f729Sjoerg //===--- Mips.h - Mips ToolChain Implementations ----------------*- C++ -*-===//
2*7330f729Sjoerg //
3*7330f729Sjoerg // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*7330f729Sjoerg // See https://llvm.org/LICENSE.txt for license information.
5*7330f729Sjoerg // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*7330f729Sjoerg //
7*7330f729Sjoerg //===----------------------------------------------------------------------===//
8*7330f729Sjoerg 
9*7330f729Sjoerg #ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_MIPS_LINUX_H
10*7330f729Sjoerg #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_MIPS_LINUX_H
11*7330f729Sjoerg 
12*7330f729Sjoerg #include "Linux.h"
13*7330f729Sjoerg #include "clang/Driver/ToolChain.h"
14*7330f729Sjoerg 
15*7330f729Sjoerg namespace clang {
16*7330f729Sjoerg namespace driver {
17*7330f729Sjoerg namespace toolchains {
18*7330f729Sjoerg 
19*7330f729Sjoerg class LLVM_LIBRARY_VISIBILITY MipsLLVMToolChain : public Linux {
20*7330f729Sjoerg protected:
21*7330f729Sjoerg   Tool *buildLinker() const override;
22*7330f729Sjoerg 
23*7330f729Sjoerg public:
24*7330f729Sjoerg   MipsLLVMToolChain(const Driver &D, const llvm::Triple &Triple,
25*7330f729Sjoerg                     const llvm::opt::ArgList &Args);
26*7330f729Sjoerg 
27*7330f729Sjoerg   void
28*7330f729Sjoerg   AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs,
29*7330f729Sjoerg                             llvm::opt::ArgStringList &CC1Args) const override;
30*7330f729Sjoerg 
31*7330f729Sjoerg   CXXStdlibType GetCXXStdlibType(const llvm::opt::ArgList &Args) const override;
32*7330f729Sjoerg 
33*7330f729Sjoerg   void addLibCxxIncludePaths(
34*7330f729Sjoerg       const llvm::opt::ArgList &DriverArgs,
35*7330f729Sjoerg       llvm::opt::ArgStringList &CC1Args) const override;
36*7330f729Sjoerg 
37*7330f729Sjoerg   void AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args,
38*7330f729Sjoerg                            llvm::opt::ArgStringList &CmdArgs) const override;
39*7330f729Sjoerg 
40*7330f729Sjoerg   std::string
41*7330f729Sjoerg   getCompilerRT(const llvm::opt::ArgList &Args, StringRef Component,
42*7330f729Sjoerg                 FileType Type = ToolChain::FT_Static) const override;
43*7330f729Sjoerg 
44*7330f729Sjoerg   std::string computeSysRoot() const override;
45*7330f729Sjoerg 
GetDefaultRuntimeLibType()46*7330f729Sjoerg   RuntimeLibType GetDefaultRuntimeLibType() const override {
47*7330f729Sjoerg     return GCCInstallation.isValid() ? RuntimeLibType::RLT_Libgcc
48*7330f729Sjoerg                                      : RuntimeLibType::RLT_CompilerRT;
49*7330f729Sjoerg   }
50*7330f729Sjoerg 
getDefaultLinker()51*7330f729Sjoerg   const char *getDefaultLinker() const override {
52*7330f729Sjoerg     return "ld.lld";
53*7330f729Sjoerg   }
54*7330f729Sjoerg 
55*7330f729Sjoerg private:
56*7330f729Sjoerg   Multilib SelectedMultilib;
57*7330f729Sjoerg   std::string LibSuffix;
58*7330f729Sjoerg };
59*7330f729Sjoerg 
60*7330f729Sjoerg } // end namespace toolchains
61*7330f729Sjoerg } // end namespace driver
62*7330f729Sjoerg } // end namespace clang
63*7330f729Sjoerg 
64*7330f729Sjoerg #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_MIPS_LINUX_H
65