clang  6.0.0svn
MipsLinux.h
Go to the documentation of this file.
1 //===--- Mips.h - Mips ToolChain Implementations ----------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_MIPS_LINUX_H
11 #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_MIPS_LINUX_H
12 
13 #include "Linux.h"
14 #include "clang/Driver/ToolChain.h"
15 
16 namespace clang {
17 namespace driver {
18 namespace toolchains {
19 
20 class LLVM_LIBRARY_VISIBILITY MipsLLVMToolChain : public Linux {
21 protected:
22  Tool *buildLinker() const override;
23 
24 public:
25  MipsLLVMToolChain(const Driver &D, const llvm::Triple &Triple,
26  const llvm::opt::ArgList &Args);
27 
28  void
29  AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs,
30  llvm::opt::ArgStringList &CC1Args) const override;
31 
32  CXXStdlibType GetCXXStdlibType(const llvm::opt::ArgList &Args) const override;
33 
34  std::string findLibCxxIncludePath() const override;
35 
36  void AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args,
37  llvm::opt::ArgStringList &CmdArgs) const override;
38 
39  std::string getCompilerRT(const llvm::opt::ArgList &Args, StringRef Component,
40  bool Shared = false) const override;
41 
42  std::string computeSysRoot() const override;
43 
45  return GCCInstallation.isValid() ? RuntimeLibType::RLT_Libgcc
46  : RuntimeLibType::RLT_CompilerRT;
47  }
48 
49  const char *getDefaultLinker() const override {
50  return "lld";
51  }
52 
53 private:
54  Multilib SelectedMultilib;
55  std::string LibSuffix;
56 };
57 
58 } // end namespace toolchains
59 } // end namespace driver
60 } // end namespace clang
61 
62 #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_MIPS_LINUX_H
RuntimeLibType GetDefaultRuntimeLibType() const override
GetDefaultRuntimeLibType - Get the default runtime library variant to use.
Definition: MipsLinux.h:44
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like comma...
Definition: Driver.h:65
const char * getDefaultLinker() const override
GetDefaultLinker - Get the default linker to use.
Definition: MipsLinux.h:49
This corresponds to a single GCC Multilib, or a segment of one controlled by a command line flag...
Definition: Multilib.h:25
Dataflow Directional Tag Classes.
Tool - Information on a specific compilation tool.
Definition: Tool.h:34