clang 20.0.0git
PS4CPU.cpp
Go to the documentation of this file.
1//===--- PS4CPU.cpp - 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#include "PS4CPU.h"
10#include "CommonArgs.h"
11#include "clang/Config/config.h"
13#include "clang/Driver/Driver.h"
17#include "llvm/Option/ArgList.h"
18#include "llvm/Support/FileSystem.h"
19#include "llvm/Support/Path.h"
20#include <cstdlib> // ::getenv
21
22using namespace clang::driver;
23using namespace clang;
24using namespace llvm::opt;
25
26// Helper to paste bits of an option together and return a saved string.
27static const char *makeArgString(const ArgList &Args, const char *Prefix,
28 const char *Base, const char *Suffix) {
29 // Basically "Prefix + Base + Suffix" all converted to Twine then saved.
30 return Args.MakeArgString(Twine(StringRef(Prefix), Base) + Suffix);
31}
32
33void tools::PScpu::addProfileRTArgs(const ToolChain &TC, const ArgList &Args,
34 ArgStringList &CmdArgs) {
35 assert(TC.getTriple().isPS());
36 auto &PSTC = static_cast<const toolchains::PS4PS5Base &>(TC);
37
38 if ((Args.hasFlag(options::OPT_fprofile_arcs, options::OPT_fno_profile_arcs,
39 false) ||
40 Args.hasFlag(options::OPT_fprofile_generate,
41 options::OPT_fno_profile_generate, false) ||
42 Args.hasFlag(options::OPT_fprofile_generate_EQ,
43 options::OPT_fno_profile_generate, false) ||
44 Args.hasFlag(options::OPT_fprofile_instr_generate,
45 options::OPT_fno_profile_instr_generate, false) ||
46 Args.hasFlag(options::OPT_fprofile_instr_generate_EQ,
47 options::OPT_fno_profile_instr_generate, false) ||
48 Args.hasFlag(options::OPT_fcs_profile_generate,
49 options::OPT_fno_profile_generate, false) ||
50 Args.hasFlag(options::OPT_fcs_profile_generate_EQ,
51 options::OPT_fno_profile_generate, false) ||
52 Args.hasArg(options::OPT_fcreate_profile) ||
53 Args.hasArg(options::OPT_coverage)))
54 CmdArgs.push_back(makeArgString(
55 Args, "--dependent-lib=", PSTC.getProfileRTLibName(), ""));
56}
57
59 const InputInfo &Output,
60 const InputInfoList &Inputs,
61 const ArgList &Args,
62 const char *LinkingOutput) const {
63 auto &TC = static_cast<const toolchains::PS4PS5Base &>(getToolChain());
64 claimNoWarnArgs(Args);
65 ArgStringList CmdArgs;
66
67 Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA, options::OPT_Xassembler);
68
69 CmdArgs.push_back("-o");
70 CmdArgs.push_back(Output.getFilename());
71
72 assert(Inputs.size() == 1 && "Unexpected number of inputs.");
73 const InputInfo &Input = Inputs[0];
74 assert(Input.isFilename() && "Invalid input.");
75 CmdArgs.push_back(Input.getFilename());
76
77 std::string AsName = TC.qualifyPSCmdName("as");
78 const char *Exec = Args.MakeArgString(TC.GetProgramPath(AsName.c_str()));
79 C.addCommand(std::make_unique<Command>(JA, *this,
81 Exec, CmdArgs, Inputs, Output));
82}
83
84void tools::PScpu::addSanitizerArgs(const ToolChain &TC, const ArgList &Args,
85 ArgStringList &CmdArgs) {
86 assert(TC.getTriple().isPS());
87 auto &PSTC = static_cast<const toolchains::PS4PS5Base &>(TC);
88 PSTC.addSanitizerArgs(Args, CmdArgs, "--dependent-lib=lib", ".a");
89}
90
91void toolchains::PS4CPU::addSanitizerArgs(const ArgList &Args,
92 ArgStringList &CmdArgs,
93 const char *Prefix,
94 const char *Suffix) const {
95 auto arg = [&](const char *Name) -> const char * {
96 return makeArgString(Args, Prefix, Name, Suffix);
97 };
98 const SanitizerArgs &SanArgs = getSanitizerArgs(Args);
99 if (SanArgs.needsUbsanRt())
100 CmdArgs.push_back(arg("SceDbgUBSanitizer_stub_weak"));
101 if (SanArgs.needsAsanRt())
102 CmdArgs.push_back(arg("SceDbgAddressSanitizer_stub_weak"));
103}
104
106 ArgStringList &CmdArgs,
107 const char *Prefix,
108 const char *Suffix) const {
109 auto arg = [&](const char *Name) -> const char * {
110 return makeArgString(Args, Prefix, Name, Suffix);
111 };
112 const SanitizerArgs &SanArgs = getSanitizerArgs(Args);
113 if (SanArgs.needsUbsanRt())
114 CmdArgs.push_back(arg("SceUBSanitizer_nosubmission_stub_weak"));
115 if (SanArgs.needsAsanRt())
116 CmdArgs.push_back(arg("SceAddressSanitizer_nosubmission_stub_weak"));
117 if (SanArgs.needsTsanRt())
118 CmdArgs.push_back(arg("SceThreadSanitizer_nosubmission_stub_weak"));
119}
120
122 const InputInfo &Output,
123 const InputInfoList &Inputs,
124 const ArgList &Args,
125 const char *LinkingOutput) const {
126 auto &TC = static_cast<const toolchains::PS4PS5Base &>(getToolChain());
127 const Driver &D = TC.getDriver();
128 ArgStringList CmdArgs;
129
130 // Silence warning for "clang -g foo.o -o foo"
131 Args.ClaimAllArgs(options::OPT_g_Group);
132 // and "clang -emit-llvm foo.o -o foo"
133 Args.ClaimAllArgs(options::OPT_emit_llvm);
134 // and for "clang -w foo.o -o foo". Other warning options are already
135 // handled somewhere else.
136 Args.ClaimAllArgs(options::OPT_w);
137
138 if (!D.SysRoot.empty())
139 CmdArgs.push_back(Args.MakeArgString("--sysroot=" + D.SysRoot));
140
141 if (Args.hasArg(options::OPT_pie))
142 CmdArgs.push_back("-pie");
143
144 if (Args.hasArg(options::OPT_static))
145 CmdArgs.push_back("-static");
146 if (Args.hasArg(options::OPT_rdynamic))
147 CmdArgs.push_back("-export-dynamic");
148 if (Args.hasArg(options::OPT_shared))
149 CmdArgs.push_back("--shared");
150
151 assert((Output.isFilename() || Output.isNothing()) && "Invalid output.");
152 if (Output.isFilename()) {
153 CmdArgs.push_back("-o");
154 CmdArgs.push_back(Output.getFilename());
155 }
156
157 const bool UseJMC =
158 Args.hasFlag(options::OPT_fjmc, options::OPT_fno_jmc, false);
159
160 const char *LTOArgs = "";
161 auto AddLTOFlag = [&](Twine Flag) {
162 LTOArgs = Args.MakeArgString(Twine(LTOArgs) + " " + Flag);
163 };
164
165 // If the linker sees bitcode objects it will perform LTO. We can't tell
166 // whether or not that will be the case at this point. So, unconditionally
167 // pass LTO options to ensure proper codegen, metadata production, etc if
168 // LTO indeed occurs.
169 if (Args.hasFlag(options::OPT_funified_lto, options::OPT_fno_unified_lto,
170 true))
171 CmdArgs.push_back(D.getLTOMode() == LTOK_Thin ? "--lto=thin"
172 : "--lto=full");
173 if (UseJMC)
174 AddLTOFlag("-enable-jmc-instrument");
175
176 if (Arg *A = Args.getLastArg(options::OPT_fcrash_diagnostics_dir))
177 AddLTOFlag(Twine("-crash-diagnostics-dir=") + A->getValue());
178
179 if (StringRef Threads = getLTOParallelism(Args, D); !Threads.empty())
180 AddLTOFlag(Twine("-threads=") + Threads);
181
182 if (*LTOArgs)
183 CmdArgs.push_back(
184 Args.MakeArgString(Twine("-lto-debug-options=") + LTOArgs));
185
186 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs))
187 TC.addSanitizerArgs(Args, CmdArgs, "-l", "");
188
189 Args.addAllArgs(CmdArgs, {options::OPT_L, options::OPT_T_Group,
190 options::OPT_s, options::OPT_t});
191
192 if (Args.hasArg(options::OPT_Z_Xlinker__no_demangle))
193 CmdArgs.push_back("--no-demangle");
194
195 AddLinkerInputs(TC, Inputs, Args, CmdArgs, JA);
196
197 if (Args.hasArg(options::OPT_pthread)) {
198 CmdArgs.push_back("-lpthread");
199 }
200
201 if (UseJMC) {
202 CmdArgs.push_back("--whole-archive");
203 CmdArgs.push_back("-lSceDbgJmc");
204 CmdArgs.push_back("--no-whole-archive");
205 }
206
207 if (Args.hasArg(options::OPT_fuse_ld_EQ)) {
208 D.Diag(diag::err_drv_unsupported_opt_for_target)
209 << "-fuse-ld" << TC.getTriple().str();
210 }
211
212 std::string LdName = TC.qualifyPSCmdName(TC.getLinkerBaseName());
213 const char *Exec = Args.MakeArgString(TC.GetProgramPath(LdName.c_str()));
214
215 C.addCommand(std::make_unique<Command>(JA, *this,
217 Exec, CmdArgs, Inputs, Output));
218}
219
221 const InputInfo &Output,
222 const InputInfoList &Inputs,
223 const ArgList &Args,
224 const char *LinkingOutput) const {
225 auto &TC = static_cast<const toolchains::PS4PS5Base &>(getToolChain());
226 const Driver &D = TC.getDriver();
227 ArgStringList CmdArgs;
228
229 // Silence warning for "clang -g foo.o -o foo"
230 Args.ClaimAllArgs(options::OPT_g_Group);
231 // and "clang -emit-llvm foo.o -o foo"
232 Args.ClaimAllArgs(options::OPT_emit_llvm);
233 // and for "clang -w foo.o -o foo". Other warning options are already
234 // handled somewhere else.
235 Args.ClaimAllArgs(options::OPT_w);
236
237 if (!D.SysRoot.empty())
238 CmdArgs.push_back(Args.MakeArgString("--sysroot=" + D.SysRoot));
239
240 if (Args.hasArg(options::OPT_pie))
241 CmdArgs.push_back("-pie");
242
243 if (Args.hasArg(options::OPT_static))
244 CmdArgs.push_back("-static");
245 if (Args.hasArg(options::OPT_rdynamic))
246 CmdArgs.push_back("-export-dynamic");
247 if (Args.hasArg(options::OPT_shared))
248 CmdArgs.push_back("--shared");
249
250 assert((Output.isFilename() || Output.isNothing()) && "Invalid output.");
251 if (Output.isFilename()) {
252 CmdArgs.push_back("-o");
253 CmdArgs.push_back(Output.getFilename());
254 }
255
256 const bool UseJMC =
257 Args.hasFlag(options::OPT_fjmc, options::OPT_fno_jmc, false);
258
259 auto AddLTOFlag = [&](Twine Flag) {
260 CmdArgs.push_back(Args.MakeArgString(Twine("-plugin-opt=") + Flag));
261 };
262
263 // If the linker sees bitcode objects it will perform LTO. We can't tell
264 // whether or not that will be the case at this point. So, unconditionally
265 // pass LTO options to ensure proper codegen, metadata production, etc if
266 // LTO indeed occurs.
267 if (Args.hasFlag(options::OPT_funified_lto, options::OPT_fno_unified_lto,
268 true))
269 CmdArgs.push_back(D.getLTOMode() == LTOK_Thin ? "--lto=thin"
270 : "--lto=full");
271
272 if (UseJMC)
273 AddLTOFlag("-enable-jmc-instrument");
274
275 if (Args.hasFlag(options::OPT_fstack_size_section,
276 options::OPT_fno_stack_size_section, false))
277 AddLTOFlag("-stack-size-section");
278
279 if (Arg *A = Args.getLastArg(options::OPT_fcrash_diagnostics_dir))
280 AddLTOFlag(Twine("-crash-diagnostics-dir=") + A->getValue());
281
282 if (StringRef Jobs = getLTOParallelism(Args, D); !Jobs.empty())
283 AddLTOFlag(Twine("jobs=") + Jobs);
284
285 if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs))
286 TC.addSanitizerArgs(Args, CmdArgs, "-l", "");
287
288 Args.addAllArgs(CmdArgs, {options::OPT_L, options::OPT_T_Group,
289 options::OPT_s, options::OPT_t});
290
291 if (Args.hasArg(options::OPT_Z_Xlinker__no_demangle))
292 CmdArgs.push_back("--no-demangle");
293
294 AddLinkerInputs(TC, Inputs, Args, CmdArgs, JA);
295
296 if (Args.hasArg(options::OPT_pthread)) {
297 CmdArgs.push_back("-lpthread");
298 }
299
300 if (UseJMC) {
301 CmdArgs.push_back("--whole-archive");
302 CmdArgs.push_back("-lSceJmc_nosubmission");
303 CmdArgs.push_back("--no-whole-archive");
304 }
305
306 if (Args.hasArg(options::OPT_fuse_ld_EQ)) {
307 D.Diag(diag::err_drv_unsupported_opt_for_target)
308 << "-fuse-ld" << TC.getTriple().str();
309 }
310
311 std::string LdName = TC.qualifyPSCmdName(TC.getLinkerBaseName());
312 const char *Exec = Args.MakeArgString(TC.GetProgramPath(LdName.c_str()));
313
314 C.addCommand(std::make_unique<Command>(JA, *this,
316 Exec, CmdArgs, Inputs, Output));
317}
318
319toolchains::PS4PS5Base::PS4PS5Base(const Driver &D, const llvm::Triple &Triple,
320 const ArgList &Args, StringRef Platform,
321 const char *EnvVar)
322 : Generic_ELF(D, Triple, Args) {
323 // Determine where to find the PS4/PS5 libraries.
324 // If -isysroot was passed, use that as the SDK base path.
325 // If not, we use the EnvVar if it exists; otherwise use the driver's
326 // installation path, which should be <SDK_DIR>/host_tools/bin.
327 SmallString<80> Whence;
328 if (const Arg *A = Args.getLastArg(options::OPT_isysroot)) {
329 SDKRootDir = A->getValue();
330 if (!llvm::sys::fs::exists(SDKRootDir))
331 D.Diag(clang::diag::warn_missing_sysroot) << SDKRootDir;
332 Whence = A->getSpelling();
333 } else if (const char *EnvValue = getenv(EnvVar)) {
334 SDKRootDir = EnvValue;
335 Whence = { "environment variable '", EnvVar, "'" };
336 } else {
337 SDKRootDir = D.Dir + "/../../";
338 Whence = "compiler's location";
339 }
340
341 SmallString<512> SDKIncludeDir(SDKRootDir);
342 llvm::sys::path::append(SDKIncludeDir, "target/include");
343 if (!Args.hasArg(options::OPT_nostdinc) &&
344 !Args.hasArg(options::OPT_nostdlibinc) &&
345 !Args.hasArg(options::OPT_isysroot) &&
346 !Args.hasArg(options::OPT__sysroot_EQ) &&
347 !llvm::sys::fs::exists(SDKIncludeDir)) {
348 D.Diag(clang::diag::warn_drv_unable_to_find_directory_expected)
349 << Twine(Platform, " system headers").str() << SDKIncludeDir << Whence;
350 }
351
352 SmallString<512> SDKLibDir(SDKRootDir);
353 llvm::sys::path::append(SDKLibDir, "target/lib");
354 if (!Args.hasArg(options::OPT_nostdlib) &&
355 !Args.hasArg(options::OPT_nodefaultlibs) &&
356 !Args.hasArg(options::OPT__sysroot_EQ) && !Args.hasArg(options::OPT_E) &&
357 !Args.hasArg(options::OPT_c) && !Args.hasArg(options::OPT_S) &&
358 !Args.hasArg(options::OPT_emit_ast) &&
359 !llvm::sys::fs::exists(SDKLibDir)) {
360 D.Diag(clang::diag::warn_drv_unable_to_find_directory_expected)
361 << Twine(Platform, " system libraries").str() << SDKLibDir << Whence;
362 return;
363 }
364 getFilePaths().push_back(std::string(SDKLibDir));
365}
366
368 const ArgList &DriverArgs,
369 ArgStringList &CC1Args) const {
370 const Driver &D = getDriver();
371
372 if (DriverArgs.hasArg(options::OPT_nostdinc))
373 return;
374
375 if (!DriverArgs.hasArg(options::OPT_nobuiltininc)) {
376 SmallString<128> Dir(D.ResourceDir);
377 llvm::sys::path::append(Dir, "include");
378 addSystemInclude(DriverArgs, CC1Args, Dir.str());
379 }
380
381 if (DriverArgs.hasArg(options::OPT_nostdlibinc))
382 return;
383
384 addExternCSystemInclude(DriverArgs, CC1Args,
385 SDKRootDir + "/target/include");
386 addExternCSystemInclude(DriverArgs, CC1Args,
387 SDKRootDir + "/target/include_common");
388}
389
391 return new tools::PScpu::Assembler(*this);
392}
393
395 return new tools::PS4cpu::Linker(*this);
396}
397
399 // PS5 does not support an external assembler.
400 getDriver().Diag(clang::diag::err_no_external_assembler);
401 return nullptr;
402}
403
405 return new tools::PS5cpu::Linker(*this);
406}
407
410 Res |= SanitizerKind::Address;
411 Res |= SanitizerKind::PointerCompare;
412 Res |= SanitizerKind::PointerSubtract;
413 Res |= SanitizerKind::Vptr;
414 return Res;
415}
416
419 Res |= SanitizerKind::Thread;
420 return Res;
421}
422
424 const ArgList &DriverArgs, ArgStringList &CC1Args,
425 Action::OffloadKind DeviceOffloadingKind) const {
426 // PS4/PS5 do not use init arrays.
427 if (DriverArgs.hasArg(options::OPT_fuse_init_array)) {
428 Arg *A = DriverArgs.getLastArg(options::OPT_fuse_init_array);
429 getDriver().Diag(clang::diag::err_drv_unsupported_opt_for_target)
430 << A->getAsString(DriverArgs) << getTriple().str();
431 }
432
433 CC1Args.push_back("-fno-use-init-array");
434
435 // Default to `hidden` visibility for PS5.
436 if (getTriple().isPS5() &&
437 !DriverArgs.hasArg(options::OPT_fvisibility_EQ,
438 options::OPT_fvisibility_ms_compat))
439 CC1Args.push_back("-fvisibility=hidden");
440
441 // Default to -fvisibility-global-new-delete=source for PS5.
442 if (getTriple().isPS5() &&
443 !DriverArgs.hasArg(options::OPT_fvisibility_global_new_delete_EQ,
444 options::OPT_fvisibility_global_new_delete_hidden))
445 CC1Args.push_back("-fvisibility-global-new-delete=source");
446
447 const Arg *A =
448 DriverArgs.getLastArg(options::OPT_fvisibility_from_dllstorageclass,
449 options::OPT_fno_visibility_from_dllstorageclass);
450 if (!A ||
451 A->getOption().matches(options::OPT_fvisibility_from_dllstorageclass)) {
452 CC1Args.push_back("-fvisibility-from-dllstorageclass");
453
454 if (DriverArgs.hasArg(options::OPT_fvisibility_dllexport_EQ))
455 DriverArgs.AddLastArg(CC1Args, options::OPT_fvisibility_dllexport_EQ);
456 else
457 CC1Args.push_back("-fvisibility-dllexport=protected");
458
459 // For PS4 we override the visibilty of globals definitions without
460 // dllimport or dllexport annotations.
461 if (DriverArgs.hasArg(options::OPT_fvisibility_nodllstorageclass_EQ))
462 DriverArgs.AddLastArg(CC1Args,
463 options::OPT_fvisibility_nodllstorageclass_EQ);
464 else if (getTriple().isPS4())
465 CC1Args.push_back("-fvisibility-nodllstorageclass=hidden");
466 else
467 CC1Args.push_back("-fvisibility-nodllstorageclass=keep");
468
469 if (DriverArgs.hasArg(options::OPT_fvisibility_externs_dllimport_EQ))
470 DriverArgs.AddLastArg(CC1Args,
471 options::OPT_fvisibility_externs_dllimport_EQ);
472 else
473 CC1Args.push_back("-fvisibility-externs-dllimport=default");
474
475 // For PS4 we override the visibilty of external globals without
476 // dllimport or dllexport annotations.
477 if (DriverArgs.hasArg(
478 options::OPT_fvisibility_externs_nodllstorageclass_EQ))
479 DriverArgs.AddLastArg(
480 CC1Args, options::OPT_fvisibility_externs_nodllstorageclass_EQ);
481 else if (getTriple().isPS4())
482 CC1Args.push_back("-fvisibility-externs-nodllstorageclass=default");
483 else
484 CC1Args.push_back("-fvisibility-externs-nodllstorageclass=keep");
485 }
486}
487
488// PS4 toolchain.
489toolchains::PS4CPU::PS4CPU(const Driver &D, const llvm::Triple &Triple,
490 const llvm::opt::ArgList &Args)
491 : PS4PS5Base(D, Triple, Args, "PS4", "SCE_ORBIS_SDK_DIR") {}
492
493// PS5 toolchain.
494toolchains::PS5CPU::PS5CPU(const Driver &D, const llvm::Triple &Triple,
495 const llvm::opt::ArgList &Args)
496 : PS4PS5Base(D, Triple, Args, "PS5", "SCE_PROSPERO_SDK_DIR") {}
const Decl * D
static const char * makeArgString(const ArgList &Args, const char *Prefix, const char *Base, const char *Suffix)
Definition: PS4CPU.cpp:27
Compilation - A set of tasks to perform for a single driver invocation.
Definition: Compilation.h:45
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like comma...
Definition: Driver.h:77
InputInfo - Wrapper for information about an input source.
Definition: InputInfo.h:22
const char * getFilename() const
Definition: InputInfo.h:83
bool isNothing() const
Definition: InputInfo.h:74
bool isFilename() const
Definition: InputInfo.h:75
ToolChain - Access to tools for a single platform.
Definition: ToolChain.h:92
path_list & getFilePaths()
Definition: ToolChain.h:294
const Driver & getDriver() const
Definition: ToolChain.h:252
const llvm::Triple & getTriple() const
Definition: ToolChain.h:254
std::string GetProgramPath(const char *Name) const
Definition: ToolChain.cpp:903
virtual SanitizerMask getSupportedSanitizers() const
Return sanitizers which are available in this toolchain.
Definition: ToolChain.cpp:1400
Tool - Information on a specific compilation tool.
Definition: Tool.h:32
const ToolChain & getToolChain() const
Definition: Tool.h:52
Tool * buildLinker() const override
Definition: PS4CPU.cpp:394
void addSanitizerArgs(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs, const char *Prefix, const char *Suffix) const override
Definition: PS4CPU.cpp:91
Tool * buildAssembler() const override
Definition: PS4CPU.cpp:390
PS4CPU(const Driver &D, const llvm::Triple &Triple, const llvm::opt::ArgList &Args)
Definition: PS4CPU.cpp:489
void AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const override
Add the clang cc1 arguments for system include paths.
Definition: PS4CPU.cpp:367
virtual void addSanitizerArgs(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs, const char *Prefix, const char *Suffix) const =0
void addClangTargetOptions(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args, Action::OffloadKind DeviceOffloadingKind) const override
Add options that need to be passed to cc1 for this target.
Definition: PS4CPU.cpp:423
PS4PS5Base(const Driver &D, const llvm::Triple &Triple, const llvm::opt::ArgList &Args, StringRef Platform, const char *EnvVar)
Definition: PS4CPU.cpp:319
SanitizerMask getSupportedSanitizers() const override
Return sanitizers which are available in this toolchain.
Definition: PS4CPU.cpp:408
Tool * buildAssembler() const override
Definition: PS4CPU.cpp:398
void addSanitizerArgs(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs, const char *Prefix, const char *Suffix) const override
Definition: PS4CPU.cpp:105
SanitizerMask getSupportedSanitizers() const override
Return sanitizers which are available in this toolchain.
Definition: PS4CPU.cpp:417
Tool * buildLinker() const override
Definition: PS4CPU.cpp:404
PS5CPU(const Driver &D, const llvm::Triple &Triple, const llvm::opt::ArgList &Args)
Definition: PS4CPU.cpp:494
void ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const llvm::opt::ArgList &TCArgs, const char *LinkingOutput) const override
ConstructJob - Construct jobs to perform the action JA, writing to Output and with Inputs,...
Definition: PS4CPU.cpp:121
void ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const llvm::opt::ArgList &TCArgs, const char *LinkingOutput) const override
ConstructJob - Construct jobs to perform the action JA, writing to Output and with Inputs,...
Definition: PS4CPU.cpp:220
void ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const llvm::opt::ArgList &TCArgs, const char *LinkingOutput) const override
ConstructJob - Construct jobs to perform the action JA, writing to Output and with Inputs,...
Definition: PS4CPU.cpp:58
void addSanitizerArgs(const ToolChain &TC, const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs)
void addProfileRTArgs(const ToolChain &TC, const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs)
llvm::StringRef getLTOParallelism(const llvm::opt::ArgList &Args, const Driver &D)
void claimNoWarnArgs(const llvm::opt::ArgList &Args)
void AddLinkerInputs(const ToolChain &TC, const InputInfoList &Inputs, const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs, const JobAction &JA)
The JSON file list parser is used to communicate input to InstallAPI.
static constexpr ResponseFileSupport AtFileUTF8()
Definition: Job.h:85