clang 22.0.0git
CSKYToolChain.h
Go to the documentation of this file.
1//===--- CSKYToolchain.h - CSKY 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_CSKYTOOLCHAIN_H
10#define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_CSKYTOOLCHAIN_H
11
12#include "Gnu.h"
14
15namespace clang {
16namespace driver {
17namespace toolchains {
18
19class LLVM_LIBRARY_VISIBILITY CSKYToolChain : public Generic_ELF {
20public:
21 CSKYToolChain(const Driver &D, const llvm::Triple &Triple,
22 const llvm::opt::ArgList &Args);
23
24 void addClangTargetOptions(const llvm::opt::ArgList &DriverArgs,
25 llvm::opt::ArgStringList &CC1Args,
26 Action::OffloadKind) const override;
28 UnwindLibType GetUnwindLibType(const llvm::opt::ArgList &Args) const override;
29 void
30 AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs,
31 llvm::opt::ArgStringList &CC1Args) const override;
32 void
33 addLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs,
34 llvm::opt::ArgStringList &CC1Args) const override;
35
36protected:
37 Tool *buildLinker() const override;
38
39private:
40 std::string computeSysRoot() const override;
41};
42
43} // end namespace toolchains
44
45namespace tools {
46namespace CSKY {
47class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
48public:
49 Linker(const ToolChain &TC) : Tool("CSKY::Linker", "ld", TC) {}
50 bool hasIntegratedCPP() const override { return false; }
51 bool isLinkJob() const override { return true; }
52 void ConstructJob(Compilation &C, const JobAction &JA,
53 const InputInfo &Output, const InputInfoList &Inputs,
54 const llvm::opt::ArgList &TCArgs,
55 const char *LinkingOutput) const override;
56};
57} // end namespace CSKY
58} // end namespace tools
59
60} // end namespace driver
61} // end namespace clang
62
63#endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_CSKYTOOLCHAIN_H
Compilation - A set of tasks to perform for a single driver invocation.
Definition Compilation.h:45
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like comma...
Definition Driver.h:99
InputInfo - Wrapper for information about an input source.
Definition InputInfo.h:22
ToolChain - Access to tools for a single platform.
Definition ToolChain.h:92
Tool - Information on a specific compilation tool.
Definition Tool.h:32
Tool(const char *Name, const char *ShortName, const ToolChain &TC)
Definition Tool.cpp:14
UnwindLibType GetUnwindLibType(const llvm::opt::ArgList &Args) const override
CSKYToolChain(const Driver &D, const llvm::Triple &Triple, const llvm::opt::ArgList &Args)
CSKY Toolchain.
void AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const override
Add the clang cc1 arguments for system include paths.
void addClangTargetOptions(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args, Action::OffloadKind) const override
Add options that need to be passed to cc1 for this target.
void addLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const override
RuntimeLibType GetDefaultRuntimeLibType() const override
GetDefaultRuntimeLibType - Get the default runtime library variant to use.
Generic_ELF(const Driver &D, const llvm::Triple &Triple, const llvm::opt::ArgList &Args)
Definition Gnu.h:439
bool isLinkJob() const override
bool hasIntegratedCPP() const override
SmallVector< InputInfo, 4 > InputInfoList
Definition Driver.h:50
The JSON file list parser is used to communicate input to InstallAPI.