clang 20.0.0git
Solaris.h
Go to the documentation of this file.
1//===--- Solaris.h - Solaris 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_SOLARIS_H
10#define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_SOLARIS_H
11
12#include "Gnu.h"
13#include "clang/Driver/Tool.h"
15
16namespace clang {
17namespace driver {
18namespace tools {
19
20/// Directly call Solaris assembler and linker
21namespace solaris {
22class LLVM_LIBRARY_VISIBILITY Assembler final : public gnutools::Assembler {
23public:
24 Assembler(const ToolChain &TC) : gnutools::Assembler(TC) {}
25
26 bool hasIntegratedCPP() const override { return false; }
27
28 void ConstructJob(Compilation &C, const JobAction &JA,
29 const InputInfo &Output, const InputInfoList &Inputs,
30 const llvm::opt::ArgList &TCArgs,
31 const char *LinkingOutput) const override;
32};
33
34bool isLinkerGnuLd(const ToolChain &TC, const llvm::opt::ArgList &Args);
35
36class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
37public:
38 Linker(const ToolChain &TC) : Tool("solaris::Linker", "linker", TC) {}
39
40 bool hasIntegratedCPP() const override { return false; }
41 bool isLinkJob() const override { return true; }
42 std::string getLinkerPath(const llvm::opt::ArgList &Args) const;
43
44 void ConstructJob(Compilation &C, const JobAction &JA,
45 const InputInfo &Output, const InputInfoList &Inputs,
46 const llvm::opt::ArgList &TCArgs,
47 const char *LinkingOutput) const override;
48};
49} // end namespace solaris
50} // end namespace tools
51
52namespace toolchains {
53
54class LLVM_LIBRARY_VISIBILITY Solaris : public Generic_ELF {
55public:
56 Solaris(const Driver &D, const llvm::Triple &Triple,
57 const llvm::opt::ArgList &Args);
58
59 void
60 AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs,
61 llvm::opt::ArgStringList &CC1Args) const override;
62
63 void
64 addLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs,
65 llvm::opt::ArgStringList &CC1Args) const override;
66
67 SanitizerMask getSupportedSanitizers() const override;
68
69 const char *getDefaultLinker() const override;
70
71protected:
72 Tool *buildAssembler() const override;
73 Tool *buildLinker() const override;
74};
75
76} // end namespace toolchains
77} // end namespace driver
78} // end namespace clang
79
80#endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_SOLARIS_H
const Decl * D
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:77
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
bool hasIntegratedCPP() const override
Definition: Solaris.h:26
Assembler(const ToolChain &TC)
Definition: Solaris.h:24
Linker(const ToolChain &TC)
Definition: Solaris.h:38
bool hasIntegratedCPP() const override
Definition: Solaris.h:40
bool isLinkJob() const override
Definition: Solaris.h:41
bool isLinkerGnuLd(const ToolChain &TC, const llvm::opt::ArgList &Args)
The JSON file list parser is used to communicate input to InstallAPI.