mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-26 13:26:22 +00:00
[PS4][clang] Limit ThinLTO parallelism when requested
Pass the correct option to the linker when "-flto-jobs=" is passed to the driver.
This commit is contained in:
parent
6f2a865d2f
commit
bbc204b944
@ -187,6 +187,12 @@ void tools::PScpu::Linker::ConstructJob(Compilation &C, const JobAction &JA,
|
||||
AddCodeGenFlag(Twine("-crash-diagnostics-dir=") + A->getValue());
|
||||
}
|
||||
|
||||
if (IsPS5 && UseLTO) {
|
||||
StringRef Parallelism = getLTOParallelism(Args, D);
|
||||
if (!Parallelism.empty())
|
||||
CmdArgs.push_back(Args.MakeArgString("-plugin-opt=jobs=" + Parallelism));
|
||||
}
|
||||
|
||||
if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs))
|
||||
TC.addSanitizerArgs(Args, CmdArgs, "-l", "");
|
||||
|
||||
|
@ -3,6 +3,9 @@
|
||||
// RUN: %clang -target x86_64-unknown-linux -### %s -flto=thin -flto-jobs=5 2> %t
|
||||
// RUN: FileCheck -check-prefix=CHECK-LINK-THIN-JOBS-ACTION < %t %s
|
||||
//
|
||||
// RUN: %clang -target x86_64-sie-ps5 -### %s -flto=thin -flto-jobs=5 2> %t
|
||||
// RUN: FileCheck -check-prefix=CHECK-LINK-THIN-JOBS-ACTION < %t %s
|
||||
//
|
||||
// CHECK-LINK-THIN-JOBS-ACTION: "-plugin-opt=jobs=5"
|
||||
|
||||
// RUN: %clang -target x86_64-apple-darwin13.3.0 -### %s -flto=thin -flto-jobs=5 2> %t
|
||||
|
Loading…
x
Reference in New Issue
Block a user