diff options
| author | Andrew Ng <andrew.ng@sony.com> | 2025-10-02 18:30:51 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-02 18:30:51 +0100 |
| commit | d68f0c2e1c1fafea983f92233e8ef9bcfe2a410a (patch) | |
| tree | 3194c6b07df4cd67e219700bb80f710dc43dcabd /lld | |
| parent | 5843ffb14940920f72516dfe18ed657bee23d1c5 (diff) | |
[DTLTO][LLD] Tidy up DTLTO related options (NFC) (#161675)
Change LLD DTLTO option definitions to match actual option name.
Diffstat (limited to 'lld')
| -rw-r--r-- | lld/COFF/Driver.cpp | 10 | ||||
| -rw-r--r-- | lld/COFF/Options.td | 4 | ||||
| -rw-r--r-- | lld/ELF/Driver.cpp | 5 | ||||
| -rw-r--r-- | lld/ELF/Options.td | 6 |
4 files changed, 13 insertions, 12 deletions
diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp index a59cc06d5183..3676b8881016 100644 --- a/lld/COFF/Driver.cpp +++ b/lld/COFF/Driver.cpp @@ -2104,18 +2104,18 @@ void LinkerDriver::linkerMain(ArrayRef<const char *> argsArr) { config->dtltoDistributor = args.getLastArgValue(OPT_thinlto_distributor); // Handle /thinlto-distributor-arg:<arg> - for (auto *arg : args.filtered(OPT_thinlto_distributor_arg)) - config->dtltoDistributorArgs.push_back(arg->getValue()); + config->dtltoDistributorArgs = + args::getStrings(args, OPT_thinlto_distributor_arg); // Handle /thinlto-remote-compiler:<path> - config->dtltoCompiler = args.getLastArgValue(OPT_thinlto_compiler); + config->dtltoCompiler = args.getLastArgValue(OPT_thinlto_remote_compiler); if (!config->dtltoDistributor.empty() && config->dtltoCompiler.empty()) Err(ctx) << "A value must be specified for /thinlto-remote-compiler if " "/thinlto-distributor is specified."; // Handle /thinlto-remote-compiler-arg:<arg> - for (auto *arg : args.filtered(OPT_thinlto_compiler_arg)) - config->dtltoCompilerArgs.push_back(arg->getValue()); + config->dtltoCompilerArgs = + args::getStrings(args, OPT_thinlto_remote_compiler_arg); // Handle /dwodir config->dwoDir = args.getLastArgValue(OPT_dwodir); diff --git a/lld/COFF/Options.td b/lld/COFF/Options.td index 485db5a8b21c..f3d0eb335620 100644 --- a/lld/COFF/Options.td +++ b/lld/COFF/Options.td @@ -289,10 +289,10 @@ def thinlto_distributor : P<"thinlto-distributor", "backend compilations will be distributed">; def thinlto_distributor_arg : P<"thinlto-distributor-arg", "Arguments to pass to the ThinLTO distributor">; -def thinlto_compiler : P<"thinlto-remote-compiler", +def thinlto_remote_compiler : P<"thinlto-remote-compiler", "Compiler for the ThinLTO distributor to invoke for ThinLTO backend " "compilations">; -def thinlto_compiler_arg : P<"thinlto-remote-compiler-arg", +def thinlto_remote_compiler_arg : P<"thinlto-remote-compiler-arg", "Compiler arguments for the ThinLTO distributor to pass for ThinLTO backend " "compilations">; def lto_obj_path : P< diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp index 1beab8d33f4b..62f7fffce7db 100644 --- a/lld/ELF/Driver.cpp +++ b/lld/ELF/Driver.cpp @@ -1399,8 +1399,9 @@ static void readConfigs(Ctx &ctx, opt::InputArgList &args) { ctx.arg.dtltoDistributor = args.getLastArgValue(OPT_thinlto_distributor_eq); ctx.arg.dtltoDistributorArgs = args::getStrings(args, OPT_thinlto_distributor_arg); - ctx.arg.dtltoCompiler = args.getLastArgValue(OPT_thinlto_compiler_eq); - ctx.arg.dtltoCompilerArgs = args::getStrings(args, OPT_thinlto_compiler_arg); + ctx.arg.dtltoCompiler = args.getLastArgValue(OPT_thinlto_remote_compiler_eq); + ctx.arg.dtltoCompilerArgs = + args::getStrings(args, OPT_thinlto_remote_compiler_arg); ctx.arg.dwoDir = args.getLastArgValue(OPT_plugin_opt_dwo_dir_eq); ctx.arg.dynamicLinker = getDynamicLinker(ctx, args); ctx.arg.ehFrameHdr = diff --git a/lld/ELF/Options.td b/lld/ELF/Options.td index f0523185a0a3..0d6dda4b60d3 100644 --- a/lld/ELF/Options.td +++ b/lld/ELF/Options.td @@ -722,11 +722,11 @@ def thinlto_distributor_eq: JJ<"thinlto-distributor=">, "ThinLTO backend compilations will be distributed">; defm thinlto_distributor_arg: EEq<"thinlto-distributor-arg", "Arguments to " "pass to the ThinLTO distributor">; -def thinlto_compiler_eq: JJ<"thinlto-remote-compiler=">, +def thinlto_remote_compiler_eq: JJ<"thinlto-remote-compiler=">, HelpText<"Compiler for the ThinLTO distributor to invoke for ThinLTO backend " "compilations">; -defm thinlto_compiler_arg: EEq<"thinlto-remote-compiler-arg", "Compiler " - "arguments for the ThinLTO distributor to pass for ThinLTO backend " +defm thinlto_remote_compiler_arg: EEq<"thinlto-remote-compiler-arg", + "Compiler arguments for the ThinLTO distributor to pass for ThinLTO backend " "compilations">; defm fat_lto_objects: BB<"fat-lto-objects", "Use the .llvm.lto section, which contains LLVM bitcode, in fat LTO object files to perform LTO.", |
