17330f729Sjoerg //===--- Linux.h - Linux ToolChain Implementations --------------*- C++ -*-===// 27330f729Sjoerg // 37330f729Sjoerg // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 47330f729Sjoerg // See https://llvm.org/LICENSE.txt for license information. 57330f729Sjoerg // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 67330f729Sjoerg // 77330f729Sjoerg //===----------------------------------------------------------------------===// 87330f729Sjoerg 97330f729Sjoerg #ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_LINUX_H 107330f729Sjoerg #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_LINUX_H 117330f729Sjoerg 127330f729Sjoerg #include "Gnu.h" 137330f729Sjoerg #include "clang/Driver/ToolChain.h" 147330f729Sjoerg 157330f729Sjoerg namespace clang { 167330f729Sjoerg namespace driver { 177330f729Sjoerg namespace toolchains { 187330f729Sjoerg 197330f729Sjoerg class LLVM_LIBRARY_VISIBILITY Linux : public Generic_ELF { 207330f729Sjoerg public: 217330f729Sjoerg Linux(const Driver &D, const llvm::Triple &Triple, 227330f729Sjoerg const llvm::opt::ArgList &Args); 237330f729Sjoerg 247330f729Sjoerg bool HasNativeLLVMSupport() const override; 257330f729Sjoerg 26*e038c9c4Sjoerg std::string getMultiarchTriple(const Driver &D, 27*e038c9c4Sjoerg const llvm::Triple &TargetTriple, 28*e038c9c4Sjoerg StringRef SysRoot) const override; 29*e038c9c4Sjoerg 307330f729Sjoerg void 317330f729Sjoerg AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs, 327330f729Sjoerg llvm::opt::ArgStringList &CC1Args) const override; 337330f729Sjoerg void addLibStdCxxIncludePaths( 347330f729Sjoerg const llvm::opt::ArgList &DriverArgs, 357330f729Sjoerg llvm::opt::ArgStringList &CC1Args) const override; 367330f729Sjoerg void AddCudaIncludeArgs(const llvm::opt::ArgList &DriverArgs, 377330f729Sjoerg llvm::opt::ArgStringList &CC1Args) const override; 38*e038c9c4Sjoerg void AddHIPIncludeArgs(const llvm::opt::ArgList &DriverArgs, 39*e038c9c4Sjoerg llvm::opt::ArgStringList &CC1Args) const override; 407330f729Sjoerg void AddIAMCUIncludeArgs(const llvm::opt::ArgList &DriverArgs, 417330f729Sjoerg llvm::opt::ArgStringList &CC1Args) const override; 42*e038c9c4Sjoerg RuntimeLibType GetDefaultRuntimeLibType() const override; 437330f729Sjoerg CXXStdlibType GetDefaultCXXStdlibType() const override; 44*e038c9c4Sjoerg bool 45*e038c9c4Sjoerg IsAArch64OutlineAtomicsDefault(const llvm::opt::ArgList &Args) const override; 467330f729Sjoerg bool isPIEDefault() const override; 477330f729Sjoerg bool isNoExecStackDefault() const override; 487330f729Sjoerg bool IsMathErrnoDefault() const override; 497330f729Sjoerg SanitizerMask getSupportedSanitizers() const override; 507330f729Sjoerg void addProfileRTLibs(const llvm::opt::ArgList &Args, 517330f729Sjoerg llvm::opt::ArgStringList &CmdArgs) const override; 52*e038c9c4Sjoerg std::string computeSysRoot() const override; 537330f729Sjoerg 54*e038c9c4Sjoerg std::string getDynamicLinker(const llvm::opt::ArgList &Args) const override; 55*e038c9c4Sjoerg 56*e038c9c4Sjoerg void addExtraOpts(llvm::opt::ArgStringList &CmdArgs) const override; 577330f729Sjoerg 587330f729Sjoerg std::vector<std::string> ExtraOpts; 597330f729Sjoerg 60*e038c9c4Sjoerg llvm::DenormalMode getDefaultDenormalModeForType( 61*e038c9c4Sjoerg const llvm::opt::ArgList &DriverArgs, const JobAction &JA, 62*e038c9c4Sjoerg const llvm::fltSemantics *FPType = nullptr) const override; 63*e038c9c4Sjoerg 647330f729Sjoerg protected: 657330f729Sjoerg Tool *buildAssembler() const override; 667330f729Sjoerg Tool *buildLinker() const override; 67*e038c9c4Sjoerg Tool *buildStaticLibTool() const override; 687330f729Sjoerg }; 697330f729Sjoerg 707330f729Sjoerg } // end namespace toolchains 717330f729Sjoerg } // end namespace driver 727330f729Sjoerg } // end namespace clang 737330f729Sjoerg 747330f729Sjoerg #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_LINUX_H 75