Args.addOptInFlag(CmdArgs, options::OPT_fborland_extensions,
options::OPT_fno_borland_extensions);
- // -fno-declspec is default, except for PS4.
+ // -fno-declspec is default, except for PS4/PS5.
if (Args.hasFlag(options::OPT_fdeclspec, options::OPT_fno_declspec,
- RawTriple.isPS4()))
+ RawTriple.isPS()))
CmdArgs.push_back("-fdeclspec");
else if (Args.hasArg(options::OPT_fno_declspec))
CmdArgs.push_back("-fno-declspec"); // Explicitly disabling __declspec.
return LtoJobsArg->getValue();
}
-// CloudABI uses -ffunction-sections and -fdata-sections by default.
+// CloudABI and PS4/PS5 use -ffunction-sections and -fdata-sections by default.
bool tools::isUseSeparateSections(const llvm::Triple &Triple) {
- return Triple.getOS() == llvm::Triple::CloudABI;
+ return Triple.getOS() == llvm::Triple::CloudABI || Triple.isPS();
}
void tools::addLTOOptions(const ToolChain &ToolChain, const ArgList &Args,
--- /dev/null
+// PS4/PS5 miscellaneous toolchain defaults.
+
+// RUN: %clang -c %s -### -target x86_64-scei-ps4 2>&1 | FileCheck %s
+// RUN: %clang -c %s -### -target x86_64-sie-ps5 2>&1 | FileCheck %s
+// CHECK-DAG: "-ffunction-sections"
+// CHECK-DAG: "-fdata-sections"
+// CHECK-DAG: "-fdeclspec"