1 1.1 joerg //===--- Solaris.h - Solaris ToolChain Implementations ----------*- C++ -*-===// 2 1.1 joerg // 3 1.1 joerg // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 1.1 joerg // See https://llvm.org/LICENSE.txt for license information. 5 1.1 joerg // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 1.1 joerg // 7 1.1 joerg //===----------------------------------------------------------------------===// 8 1.1 joerg 9 1.1 joerg #ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_SOLARIS_H 10 1.1 joerg #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_SOLARIS_H 11 1.1 joerg 12 1.1 joerg #include "Gnu.h" 13 1.1 joerg #include "clang/Driver/Tool.h" 14 1.1 joerg #include "clang/Driver/ToolChain.h" 15 1.1 joerg 16 1.1 joerg namespace clang { 17 1.1 joerg namespace driver { 18 1.1 joerg namespace tools { 19 1.1 joerg 20 1.1 joerg /// solaris -- Directly call Solaris assembler and linker 21 1.1 joerg namespace solaris { 22 1.1 joerg class LLVM_LIBRARY_VISIBILITY Assembler : public Tool { 23 1.1 joerg public: 24 1.1 joerg Assembler(const ToolChain &TC) 25 1.1 joerg : Tool("solaris::Assembler", "assembler", TC) {} 26 1.1 joerg 27 1.1 joerg bool hasIntegratedCPP() const override { return false; } 28 1.1 joerg 29 1.1 joerg void ConstructJob(Compilation &C, const JobAction &JA, 30 1.1 joerg const InputInfo &Output, const InputInfoList &Inputs, 31 1.1 joerg const llvm::opt::ArgList &TCArgs, 32 1.1 joerg const char *LinkingOutput) const override; 33 1.1 joerg }; 34 1.1 joerg 35 1.1 joerg class LLVM_LIBRARY_VISIBILITY Linker : public Tool { 36 1.1 joerg public: 37 1.1 joerg Linker(const ToolChain &TC) : Tool("solaris::Linker", "linker", TC) {} 38 1.1 joerg 39 1.1 joerg bool hasIntegratedCPP() const override { return false; } 40 1.1 joerg bool isLinkJob() const override { return true; } 41 1.1 joerg 42 1.1 joerg void ConstructJob(Compilation &C, const JobAction &JA, 43 1.1 joerg const InputInfo &Output, const InputInfoList &Inputs, 44 1.1 joerg const llvm::opt::ArgList &TCArgs, 45 1.1 joerg const char *LinkingOutput) const override; 46 1.1 joerg }; 47 1.1 joerg } // end namespace solaris 48 1.1 joerg } // end namespace tools 49 1.1 joerg 50 1.1 joerg namespace toolchains { 51 1.1 joerg 52 1.1 joerg class LLVM_LIBRARY_VISIBILITY Solaris : public Generic_ELF { 53 1.1 joerg public: 54 1.1 joerg Solaris(const Driver &D, const llvm::Triple &Triple, 55 1.1 joerg const llvm::opt::ArgList &Args); 56 1.1 joerg 57 1.1 joerg void 58 1.1 joerg AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs, 59 1.1 joerg llvm::opt::ArgStringList &CC1Args) const override; 60 1.1 joerg 61 1.1 joerg void 62 1.1 joerg addLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, 63 1.1 joerg llvm::opt::ArgStringList &CC1Args) const override; 64 1.1 joerg 65 1.1 joerg SanitizerMask getSupportedSanitizers() const override; 66 1.1 joerg unsigned GetDefaultDwarfVersion() const override { return 2; } 67 1.1 joerg 68 1.1.1.2 joerg const char *getDefaultLinker() const override { 69 1.1.1.2 joerg // clang currently uses Solaris ld-only options. 70 1.1.1.2 joerg return "/usr/bin/ld"; 71 1.1.1.2 joerg } 72 1.1.1.2 joerg 73 1.1 joerg protected: 74 1.1 joerg Tool *buildAssembler() const override; 75 1.1 joerg Tool *buildLinker() const override; 76 1.1 joerg }; 77 1.1 joerg 78 1.1 joerg } // end namespace toolchains 79 1.1 joerg } // end namespace driver 80 1.1 joerg } // end namespace clang 81 1.1 joerg 82 1.1 joerg #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_SOLARIS_H 83