[docs] Fix build-docs.sh
[llvm-project.git] / clang / lib / Driver / ToolChains / AVR.h
blobcd2bbee9efd664a5069f229059be854e054d8e26
1 //===--- AVR.h - AVR Tool and 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_AVR_H
10 #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_AVR_H
12 #include "Gnu.h"
13 #include "clang/Driver/InputInfo.h"
14 #include "clang/Driver/Tool.h"
15 #include "clang/Driver/ToolChain.h"
17 namespace clang {
18 namespace driver {
19 namespace toolchains {
21 class LLVM_LIBRARY_VISIBILITY AVRToolChain : public Generic_ELF {
22 public:
23 AVRToolChain(const Driver &D, const llvm::Triple &Triple,
24 const llvm::opt::ArgList &Args);
25 void
26 AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs,
27 llvm::opt::ArgStringList &CC1Args) const override;
29 void
30 addClangTargetOptions(const llvm::opt::ArgList &DriverArgs,
31 llvm::opt::ArgStringList &CC1Args,
32 Action::OffloadKind DeviceOffloadKind) const override;
34 llvm::Optional<std::string> findAVRLibcInstallation() const;
35 StringRef getGCCInstallPath() const { return GCCInstallPath; }
36 std::string getCompilerRT(const llvm::opt::ArgList &Args, StringRef Component,
37 FileType Type) const override;
39 protected:
40 Tool *buildLinker() const override;
42 private:
43 StringRef GCCInstallPath;
46 } // end namespace toolchains
48 namespace tools {
49 namespace AVR {
50 class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
51 public:
52 Linker(const llvm::Triple &Triple, const ToolChain &TC)
53 : Tool("AVR::Linker", "avr-ld", TC), Triple(Triple) {}
55 bool hasIntegratedCPP() const override { return false; }
56 bool isLinkJob() const override { return true; }
57 void ConstructJob(Compilation &C, const JobAction &JA,
58 const InputInfo &Output, const InputInfoList &Inputs,
59 const llvm::opt::ArgList &TCArgs,
60 const char *LinkingOutput) const override;
62 protected:
63 const llvm::Triple &Triple;
65 } // end namespace AVR
66 } // end namespace tools
67 } // end namespace driver
68 } // end namespace clang
70 #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_AVR_H