1 //===--- Solaris.h - Solaris ToolChain Implementations ----------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_SOLARIS_H
10 #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_SOLARIS_H
13 #include "clang/Driver/Tool.h"
14 #include "clang/Driver/ToolChain.h"
20 /// Directly call Solaris assembler and linker
22 class LLVM_LIBRARY_VISIBILITY Assembler final
: public gnutools::Assembler
{
24 Assembler(const ToolChain
&TC
) : gnutools::Assembler(TC
) {}
26 bool hasIntegratedCPP() const override
{ return false; }
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
;
34 bool isLinkerGnuLd(const ToolChain
&TC
, const llvm::opt::ArgList
&Args
);
36 class LLVM_LIBRARY_VISIBILITY Linker final
: public Tool
{
38 Linker(const ToolChain
&TC
) : Tool("solaris::Linker", "linker", TC
) {}
40 bool hasIntegratedCPP() const override
{ return false; }
41 bool isLinkJob() const override
{ return true; }
42 std::string
getLinkerPath(const llvm::opt::ArgList
&Args
) const;
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
;
49 } // end namespace solaris
50 } // end namespace tools
52 namespace toolchains
{
54 class LLVM_LIBRARY_VISIBILITY Solaris
: public Generic_ELF
{
56 Solaris(const Driver
&D
, const llvm::Triple
&Triple
,
57 const llvm::opt::ArgList
&Args
);
60 AddClangSystemIncludeArgs(const llvm::opt::ArgList
&DriverArgs
,
61 llvm::opt::ArgStringList
&CC1Args
) const override
;
64 addLibStdCxxIncludePaths(const llvm::opt::ArgList
&DriverArgs
,
65 llvm::opt::ArgStringList
&CC1Args
) const override
;
67 SanitizerMask
getSupportedSanitizers() const override
;
69 const char *getDefaultLinker() const override
;
72 Tool
*buildAssembler() const override
;
73 Tool
*buildLinker() const override
;
76 } // end namespace toolchains
77 } // end namespace driver
78 } // end namespace clang
80 #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_SOLARIS_H