[docs] Fix build-docs.sh
[llvm-project.git] / clang / lib / Driver / ToolChains / RISCVToolchain.h
blob46b94bdb54e095afefff1c3077669c6f4e47d533
1 //===--- RISCVToolchain.h - RISCV 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_RISCVTOOLCHAIN_H
10 #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_RISCVTOOLCHAIN_H
12 #include "Gnu.h"
13 #include "clang/Driver/ToolChain.h"
15 namespace clang {
16 namespace driver {
17 namespace toolchains {
19 class LLVM_LIBRARY_VISIBILITY RISCVToolChain : public Generic_ELF {
20 public:
21 RISCVToolChain(const Driver &D, const llvm::Triple &Triple,
22 const llvm::opt::ArgList &Args);
24 static bool hasGCCToolchain(const Driver &D, const llvm::opt::ArgList &Args);
25 void addClangTargetOptions(const llvm::opt::ArgList &DriverArgs,
26 llvm::opt::ArgStringList &CC1Args,
27 Action::OffloadKind) const override;
28 RuntimeLibType GetDefaultRuntimeLibType() const override;
29 UnwindLibType
30 GetUnwindLibType(const llvm::opt::ArgList &Args) const override;
31 void
32 AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs,
33 llvm::opt::ArgStringList &CC1Args) const override;
34 void
35 addLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs,
36 llvm::opt::ArgStringList &CC1Args) const override;
38 protected:
39 Tool *buildLinker() const override;
41 private:
42 std::string computeSysRoot() const override;
45 } // end namespace toolchains
47 namespace tools {
48 namespace RISCV {
49 class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
50 public:
51 Linker(const ToolChain &TC) : Tool("RISCV::Linker", "ld", TC) {}
52 bool hasIntegratedCPP() const override { return false; }
53 bool isLinkJob() const override { return true; }
54 void ConstructJob(Compilation &C, const JobAction &JA,
55 const InputInfo &Output, const InputInfoList &Inputs,
56 const llvm::opt::ArgList &TCArgs,
57 const char *LinkingOutput) const override;
59 } // end namespace RISCV
60 } // end namespace tools
62 } // end namespace driver
63 } // end namespace clang
65 #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_RISCVTOOLCHAIN_H