David L. Jones | f561aba | 2017-03-08 01:02:16 +0000 | [diff] [blame] | 1 | //===--- Solaris.h - Solaris ToolChain Implementations ----------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_SOLARIS_H |
| 11 | #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_SOLARIS_H |
| 12 | |
| 13 | #include "Gnu.h" |
| 14 | #include "clang/Driver/Tool.h" |
| 15 | #include "clang/Driver/ToolChain.h" |
| 16 | |
| 17 | namespace clang { |
| 18 | namespace driver { |
| 19 | namespace tools { |
| 20 | |
| 21 | /// solaris -- Directly call Solaris assembler and linker |
| 22 | namespace solaris { |
| 23 | class LLVM_LIBRARY_VISIBILITY Assembler : public Tool { |
| 24 | public: |
| 25 | Assembler(const ToolChain &TC) |
| 26 | : Tool("solaris::Assembler", "assembler", TC) {} |
| 27 | |
| 28 | bool hasIntegratedCPP() const override { return false; } |
| 29 | |
| 30 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 31 | const InputInfo &Output, const InputInfoList &Inputs, |
| 32 | const llvm::opt::ArgList &TCArgs, |
| 33 | const char *LinkingOutput) const override; |
| 34 | }; |
| 35 | |
| 36 | class LLVM_LIBRARY_VISIBILITY Linker : public Tool { |
| 37 | public: |
| 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 | |
| 43 | void ConstructJob(Compilation &C, const JobAction &JA, |
| 44 | const InputInfo &Output, const InputInfoList &Inputs, |
| 45 | const llvm::opt::ArgList &TCArgs, |
| 46 | const char *LinkingOutput) const override; |
| 47 | }; |
| 48 | } // end namespace solaris |
| 49 | } // end namespace tools |
| 50 | |
| 51 | namespace toolchains { |
| 52 | |
Aaron Ballman | 4a6d7d4 | 2017-07-14 17:49:52 +0000 | [diff] [blame] | 53 | class LLVM_LIBRARY_VISIBILITY Solaris : public Generic_ELF { |
David L. Jones | f561aba | 2017-03-08 01:02:16 +0000 | [diff] [blame] | 54 | public: |
| 55 | Solaris(const Driver &D, const llvm::Triple &Triple, |
| 56 | const llvm::opt::ArgList &Args); |
| 57 | |
| 58 | bool IsIntegratedAssemblerDefault() const override { return true; } |
| 59 | |
Fedor Sergeev | faa0a82 | 2018-01-23 12:23:52 +0000 | [diff] [blame] | 60 | void |
| 61 | AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs, |
| 62 | llvm::opt::ArgStringList &CC1Args) const override; |
| 63 | |
| 64 | void |
| 65 | addLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, |
| 66 | llvm::opt::ArgStringList &CC1Args) const override; |
David L. Jones | f561aba | 2017-03-08 01:02:16 +0000 | [diff] [blame] | 67 | |
Alex Shlyapnikov | 85da0f6 | 2018-02-05 23:59:13 +0000 | [diff] [blame] | 68 | SanitizerMask getSupportedSanitizers() const override; |
David L. Jones | f561aba | 2017-03-08 01:02:16 +0000 | [diff] [blame] | 69 | unsigned GetDefaultDwarfVersion() const override { return 2; } |
| 70 | |
| 71 | protected: |
| 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 |