clang  14.0.0git
Linux.h
Go to the documentation of this file.
1 //===--- Linux.h - Linux ToolChain Implementations --------------*- C++ -*-===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_LINUX_H
10 #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_LINUX_H
11 
12 #include "Gnu.h"
13 #include "clang/Driver/ToolChain.h"
14 
15 namespace clang {
16 namespace driver {
17 namespace toolchains {
18 
19 class LLVM_LIBRARY_VISIBILITY Linux : public Generic_ELF {
20 public:
21  Linux(const Driver &D, const llvm::Triple &Triple,
22  const llvm::opt::ArgList &Args);
23 
24  bool HasNativeLLVMSupport() const override;
25 
26  std::string getMultiarchTriple(const Driver &D,
27  const llvm::Triple &TargetTriple,
28  StringRef SysRoot) const override;
29 
30  void
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 AddIAMCUIncludeArgs(const llvm::opt::ArgList &DriverArgs,
41  llvm::opt::ArgStringList &CC1Args) const override;
42  RuntimeLibType GetDefaultRuntimeLibType() const override;
43  CXXStdlibType GetDefaultCXXStdlibType() const override;
44  bool
45  IsAArch64OutlineAtomicsDefault(const llvm::opt::ArgList &Args) const override;
46  bool isPIEDefault() const override;
47  bool isNoExecStackDefault() const override;
48  bool IsMathErrnoDefault() const override;
49  SanitizerMask getSupportedSanitizers() const override;
50  void addProfileRTLibs(const llvm::opt::ArgList &Args,
51  llvm::opt::ArgStringList &CmdArgs) const override;
52  std::string computeSysRoot() const override;
53 
54  std::string getDynamicLinker(const llvm::opt::ArgList &Args) const override;
55 
56  void addExtraOpts(llvm::opt::ArgStringList &CmdArgs) const override;
57 
58  std::vector<std::string> ExtraOpts;
59 
60  llvm::DenormalMode getDefaultDenormalModeForType(
61  const llvm::opt::ArgList &DriverArgs, const JobAction &JA,
62  const llvm::fltSemantics *FPType = nullptr) const override;
63 
64 protected:
65  Tool *buildAssembler() const override;
66  Tool *buildLinker() const override;
67  Tool *buildStaticLibTool() const override;
68 };
69 
70 } // end namespace toolchains
71 } // end namespace driver
72 } // end namespace clang
73 
74 #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_LINUX_H
string
string(SUBSTRING ${CMAKE_CURRENT_BINARY_DIR} 0 ${PATH_LIB_START} PATH_HEAD) string(SUBSTRING $
Definition: CMakeLists.txt:22
clang::driver::ToolChain::RuntimeLibType
RuntimeLibType
Definition: ToolChain.h:100
clang::driver::Tool
Tool - Information on a specific compilation tool.
Definition: Tool.h:32
clang::driver::toolchains::Generic_ELF
Definition: Gnu.h:362
clang::driver::toolchains::Linux::ExtraOpts
std::vector< std::string > ExtraOpts
Definition: Linux.h:58
clang::driver::ToolChain::CXXStdlibType
CXXStdlibType
Definition: ToolChain.h:95
clang::driver::toolchains::Linux
Definition: Linux.h:19
ToolChain.h
Gnu.h
clang
Definition: CalledOnceCheck.h:17
clang::driver::Driver
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like comma...
Definition: Driver.h:59
clang::driver::JobAction
Definition: Action.h:380
clang::SanitizerMask
Definition: Sanitizers.h:30