clang  10.0.0svn
PS4CPU.h
Go to the documentation of this file.
1 //===--- PS4CPU.h - PS4CPU 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_PS4CPU_H
10 #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_PS4CPU_H
11 
12 #include "Gnu.h"
13 #include "clang/Driver/Tool.h"
14 #include "clang/Driver/ToolChain.h"
15 
16 namespace clang {
17 namespace driver {
18 namespace tools {
19 
20 namespace PS4cpu {
21 
22 void addProfileRTArgs(const ToolChain &TC, const llvm::opt::ArgList &Args,
23  llvm::opt::ArgStringList &CmdArgs);
24 
25 void addSanitizerArgs(const ToolChain &TC, llvm::opt::ArgStringList &CmdArgs);
26 
27 class LLVM_LIBRARY_VISIBILITY Assemble : public Tool {
28 public:
29  Assemble(const ToolChain &TC)
30  : Tool("PS4cpu::Assemble", "assembler", TC, RF_Full) {}
31 
32  bool hasIntegratedCPP() const override { return false; }
33 
34  void ConstructJob(Compilation &C, const JobAction &JA,
35  const InputInfo &Output,
36  const InputInfoList &Inputs,
37  const llvm::opt::ArgList &TCArgs,
38  const char *LinkingOutput) const override;
39 };
40 
41 class LLVM_LIBRARY_VISIBILITY Link : public Tool {
42 public:
43  Link(const ToolChain &TC) : Tool("PS4cpu::Link", "linker", TC, RF_Full) {}
44 
45  bool hasIntegratedCPP() const override { return false; }
46  bool isLinkJob() const override { return true; }
47 
48  void ConstructJob(Compilation &C, const JobAction &JA,
49  const InputInfo &Output,
50  const InputInfoList &Inputs,
51  const llvm::opt::ArgList &TCArgs,
52  const char *LinkingOutput) const override;
53 };
54 } // end namespace PS4cpu
55 } // namespace tools
56 
57 namespace toolchains {
58 
59 class LLVM_LIBRARY_VISIBILITY PS4CPU : public Generic_ELF {
60 public:
61  PS4CPU(const Driver &D, const llvm::Triple &Triple,
62  const llvm::opt::ArgList &Args);
63 
64  // No support for finding a C++ standard library yet.
66  const llvm::opt::ArgList &DriverArgs,
67  llvm::opt::ArgStringList &CC1Args) const override {}
69  const llvm::opt::ArgList &DriverArgs,
70  llvm::opt::ArgStringList &CC1Args) const override {}
71 
72  bool IsMathErrnoDefault() const override { return false; }
73  bool IsObjCNonFragileABIDefault() const override { return true; }
74  bool HasNativeLLVMSupport() const override;
75  bool isPICDefault() const override;
76 
77  unsigned GetDefaultStackProtectorLevel(bool KernelOrKext) const override {
78  return 2; // SSPStrong
79  }
80 
81  llvm::DebuggerKind getDefaultDebuggerTuning() const override {
82  return llvm::DebuggerKind::SCE;
83  }
84 
85  SanitizerMask getSupportedSanitizers() const override;
86 
87 protected:
88  Tool *buildAssembler() const override;
89  Tool *buildLinker() const override;
90 };
91 
92 } // end namespace toolchains
93 } // end namespace driver
94 } // end namespace clang
95 
96 #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_PS4CPU_H
void addProfileRTArgs(const ToolChain &TC, const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs)
unsigned GetDefaultStackProtectorLevel(bool KernelOrKext) const override
GetDefaultStackProtectorLevel - Get the default stack protector level for this tool chain (0=off...
Definition: PS4CPU.h:77
InputInfo - Wrapper for information about an input source.
Definition: InputInfo.h:22
Assemble(const ToolChain &TC)
Definition: PS4CPU.h:29
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like comma...
Definition: Driver.h:59
void addLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const override
Definition: PS4CPU.h:68
llvm::DebuggerKind getDefaultDebuggerTuning() const override
Definition: PS4CPU.h:81
bool hasIntegratedCPP() const override
Definition: PS4CPU.h:32
void addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const override
Definition: PS4CPU.h:65
void addSanitizerArgs(const ToolChain &TC, llvm::opt::ArgStringList &CmdArgs)
Dataflow Directional Tag Classes.
bool IsObjCNonFragileABIDefault() const override
IsObjCNonFragileABIDefault - Does this tool chain set -fobjc-nonfragile-abi by default.
Definition: PS4CPU.h:73
Tool - Information on a specific compilation tool.
Definition: Tool.h:33
bool IsMathErrnoDefault() const override
IsMathErrnoDefault - Does this tool chain use -fmath-errno by default.
Definition: PS4CPU.h:72
Compilation - A set of tasks to perform for a single driver invocation.
Definition: Compilation.h:45
ToolChain - Access to tools for a single platform.
Definition: ToolChain.h:88