1 //===--- Linux.h - Linux 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_LINUX_H
10 #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_LINUX_H
13 #include "clang/Driver/ToolChain.h"
17 namespace toolchains
{
19 class LLVM_LIBRARY_VISIBILITY Linux
: public Generic_ELF
{
21 Linux(const Driver
&D
, const llvm::Triple
&Triple
,
22 const llvm::opt::ArgList
&Args
);
24 bool HasNativeLLVMSupport() const override
;
26 std::string
getMultiarchTriple(const Driver
&D
,
27 const llvm::Triple
&TargetTriple
,
28 StringRef SysRoot
) const override
;
31 AddClangSystemIncludeArgs(const llvm::opt::ArgList
&DriverArgs
,
32 llvm::opt::ArgStringList
&CC1Args
) const override
;
33 void addLibStdCxxIncludePaths(
34 const llvm::opt::ArgList
&DriverArgs
,
35 llvm::opt::ArgStringList
&CC1Args
) const override
;
36 void AddCudaIncludeArgs(const llvm::opt::ArgList
&DriverArgs
,
37 llvm::opt::ArgStringList
&CC1Args
) const override
;
38 void AddHIPIncludeArgs(const llvm::opt::ArgList
&DriverArgs
,
39 llvm::opt::ArgStringList
&CC1Args
) const override
;
40 void AddHIPRuntimeLibArgs(const llvm::opt::ArgList
&Args
,
41 llvm::opt::ArgStringList
&CmdArgs
) const override
;
42 void AddIAMCUIncludeArgs(const llvm::opt::ArgList
&DriverArgs
,
43 llvm::opt::ArgStringList
&CC1Args
) const override
;
44 RuntimeLibType
GetDefaultRuntimeLibType() const override
;
45 unsigned GetDefaultDwarfVersion() const override
;
46 CXXStdlibType
GetDefaultCXXStdlibType() const override
;
48 IsAArch64OutlineAtomicsDefault(const llvm::opt::ArgList
&Args
) const override
;
49 bool isPIEDefault(const llvm::opt::ArgList
&Args
) const override
;
50 bool IsMathErrnoDefault() const override
;
51 SanitizerMask
getSupportedSanitizers() const override
;
52 void addProfileRTLibs(const llvm::opt::ArgList
&Args
,
53 llvm::opt::ArgStringList
&CmdArgs
) const override
;
54 std::string
computeSysRoot() const override
;
56 std::string
getDynamicLinker(const llvm::opt::ArgList
&Args
) const override
;
58 void addExtraOpts(llvm::opt::ArgStringList
&CmdArgs
) const override
;
60 std::vector
<std::string
> ExtraOpts
;
62 llvm::DenormalMode
getDefaultDenormalModeForType(
63 const llvm::opt::ArgList
&DriverArgs
, const JobAction
&JA
,
64 const llvm::fltSemantics
*FPType
= nullptr) const override
;
67 Tool
*buildAssembler() const override
;
68 Tool
*buildLinker() const override
;
69 Tool
*buildStaticLibTool() const override
;
72 } // end namespace toolchains
73 } // end namespace driver
74 } // end namespace clang
76 #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_LINUX_H