clang  6.0.0svn
CloudABI.h
Go to the documentation of this file.
1 //===--- CloudABI.h - CloudABI 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_CLOUDABI_H
11 #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_CLOUDABI_H
12 
13 #include "Gnu.h"
14 #include "clang/Driver/Tool.h"
15 #include "clang/Driver/ToolChain.h"
16 
17 namespace clang {
18 namespace driver {
19 namespace tools {
20 
21 /// cloudabi -- Directly call GNU Binutils linker
22 namespace cloudabi {
23 class LLVM_LIBRARY_VISIBILITY Linker : public GnuTool {
24 public:
25  Linker(const ToolChain &TC) : GnuTool("cloudabi::Linker", "linker", TC) {}
26 
27  bool hasIntegratedCPP() const override { return false; }
28  bool isLinkJob() const override { return true; }
29 
30  void ConstructJob(Compilation &C, const JobAction &JA,
31  const InputInfo &Output, const InputInfoList &Inputs,
32  const llvm::opt::ArgList &TCArgs,
33  const char *LinkingOutput) const override;
34 };
35 } // end namespace cloudabi
36 } // end namespace tools
37 
38 namespace toolchains {
39 
40 class LLVM_LIBRARY_VISIBILITY CloudABI : public Generic_ELF {
41 public:
42  CloudABI(const Driver &D, const llvm::Triple &Triple,
43  const llvm::opt::ArgList &Args);
44  bool HasNativeLLVMSupport() const override { return true; }
45 
46  bool IsMathErrnoDefault() const override { return false; }
47  bool IsObjCNonFragileABIDefault() const override { return true; }
48 
50  GetCXXStdlibType(const llvm::opt::ArgList &Args) const override {
51  return ToolChain::CST_Libcxx;
52  }
53  std::string findLibCxxIncludePath() const override;
54  void AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args,
55  llvm::opt::ArgStringList &CmdArgs) const override;
56 
57  bool isPIEDefault() const override;
58  SanitizerMask getSupportedSanitizers() const override;
59  SanitizerMask getDefaultSanitizers() const override;
60 
61 protected:
62  Tool *buildLinker() const override;
63 };
64 
65 } // end namespace toolchains
66 } // end namespace driver
67 } // end namespace clang
68 
69 #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_CLOUDABI_H
bool IsMathErrnoDefault() const override
IsMathErrnoDefault - Does this tool chain use -fmath-errno by default.
Definition: CloudABI.h:46
bool isLinkJob() const override
Definition: CloudABI.h:28
bool hasIntegratedCPP() const override
Definition: CloudABI.h:27
bool IsObjCNonFragileABIDefault() const override
IsObjCNonFragileABIDefault - Does this tool chain set -fobjc-nonfragile-abi by default.
Definition: CloudABI.h:47
InputInfo - Wrapper for information about an input source.
Definition: InputInfo.h:23
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like comma...
Definition: Driver.h:65
CXXStdlibType GetCXXStdlibType(const llvm::opt::ArgList &Args) const override
Definition: CloudABI.h:50
bool HasNativeLLVMSupport() const override
HasNativeLTOLinker - Check whether the linker and related tools have native LLVM support.
Definition: CloudABI.h:44
Base class for all GNU tools that provide the same behavior when it comes to response files support...
Definition: Gnu.h:41
Dataflow Directional Tag Classes.
uint64_t SanitizerMask
Definition: Sanitizers.h:24
Tool - Information on a specific compilation tool.
Definition: Tool.h:34
Compilation - A set of tasks to perform for a single driver invocation.
Definition: Compilation.h:34
ToolChain - Access to tools for a single platform.
Definition: ToolChain.h:73