[clang] [Clang] add option --offload-jobs=N (PR #135229)
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 10 11:23:46 PDT 2025
================
@@ -9360,6 +9362,19 @@ void LinkerWrapper::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back(LinkArg);
addOffloadCompressArgs(Args, CmdArgs);
+
+ // Default to half of hardware threads if users do not specify it.
+ if (Arg *A = Args.getLastArg(options::OPT_offload_jobs_EQ))
----------------
jhuber6 wrote:
Isn't there an option that lets you default this? I guess it's a string, but can use `to_string`. Would remove the control flow. Also need to parse it to make sure it's an integer.
https://github.com/llvm/llvm-project/pull/135229
More information about the cfe-commits
mailing list