[docs] Fix build-docs.sh
[llvm-project.git] / clang / lib / Driver / ToolChains / CloudABI.h
blob8856fe3dde6dad78d4fa769f0139bbc9559c3ec1
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 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_CLOUDABI_H
10 #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_CLOUDABI_H
12 #include "Gnu.h"
13 #include "clang/Driver/Tool.h"
14 #include "clang/Driver/ToolChain.h"
16 namespace clang {
17 namespace driver {
18 namespace tools {
20 /// cloudabi -- Directly call GNU Binutils linker
21 namespace cloudabi {
22 class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
23 public:
24 Linker(const ToolChain &TC) : Tool("cloudabi::Linker", "linker", TC) {}
26 bool hasIntegratedCPP() const override { return false; }
27 bool isLinkJob() const override { return true; }
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;
34 } // end namespace cloudabi
35 } // end namespace tools
37 namespace toolchains {
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; }
45 bool IsMathErrnoDefault() const override { return false; }
46 bool IsObjCNonFragileABIDefault() const override { return true; }
48 CXXStdlibType
49 GetCXXStdlibType(const llvm::opt::ArgList &Args) const override {
50 return ToolChain::CST_Libcxx;
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;
58 bool isPIEDefault(const llvm::opt::ArgList &Args) const override;
59 SanitizerMask getSupportedSanitizers() const override;
60 SanitizerMask getDefaultSanitizers() const override;
62 protected:
63 Tool *buildLinker() const override;
66 } // end namespace toolchains
67 } // end namespace driver
68 } // end namespace clang
70 #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_CLOUDABI_H