[docs] Fix build-docs.sh
[llvm-project.git] / clang / lib / Driver / ToolChains / NaCl.h
blob5e5fdb583bb6008ed015a8e0ad3e1bfd1d08def3
1 //===--- NaCl.h - Native Client 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_NACL_H
10 #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_NACL_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 {
19 namespace nacltools {
20 class LLVM_LIBRARY_VISIBILITY AssemblerARM : public gnutools::Assembler {
21 public:
22 AssemblerARM(const ToolChain &TC) : gnutools::Assembler(TC) {}
24 void ConstructJob(Compilation &C, const JobAction &JA,
25 const InputInfo &Output, const InputInfoList &Inputs,
26 const llvm::opt::ArgList &TCArgs,
27 const char *LinkingOutput) const override;
30 class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
31 public:
32 Linker(const ToolChain &TC) : Tool("NaCl::Linker", "linker", TC) {}
34 bool hasIntegratedCPP() const override { return false; }
35 bool isLinkJob() const override { return true; }
37 void ConstructJob(Compilation &C, const JobAction &JA,
38 const InputInfo &Output, const InputInfoList &Inputs,
39 const llvm::opt::ArgList &TCArgs,
40 const char *LinkingOutput) const override;
42 } // end namespace nacltools
43 } // end namespace tools
45 namespace toolchains {
47 class LLVM_LIBRARY_VISIBILITY NaClToolChain : public Generic_ELF {
48 public:
49 NaClToolChain(const Driver &D, const llvm::Triple &Triple,
50 const llvm::opt::ArgList &Args);
52 void
53 AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs,
54 llvm::opt::ArgStringList &CC1Args) const override;
55 void addLibCxxIncludePaths(
56 const llvm::opt::ArgList &DriverArgs,
57 llvm::opt::ArgStringList &CC1Args) const override;
59 CXXStdlibType GetCXXStdlibType(const llvm::opt::ArgList &Args) const override;
61 void AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args,
62 llvm::opt::ArgStringList &CmdArgs) const override;
64 bool IsIntegratedAssemblerDefault() const override {
65 return getTriple().getArch() == llvm::Triple::mipsel;
68 // Get the path to the file containing NaCl's ARM macros.
69 // It lives in NaClToolChain because the ARMAssembler tool needs a
70 // const char * that it can pass around,
71 const char *GetNaClArmMacrosPath() const { return NaClArmMacrosPath.c_str(); }
73 std::string ComputeEffectiveClangTriple(const llvm::opt::ArgList &Args,
74 types::ID InputType) const override;
76 protected:
77 Tool *buildLinker() const override;
78 Tool *buildAssembler() const override;
80 private:
81 std::string NaClArmMacrosPath;
84 } // end namespace toolchains
85 } // end namespace driver
86 } // end namespace clang
88 #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_NACL_H