clang 10.0.0git

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