From 8a4a900f93a704f18d5489b682508840a8cda179 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Tue, 30 Jan 2024 16:07:49 +0100 Subject: just-mrrc: support remote-execution properties While just-mr does not use remote-execution properties, it is still useful to have those as a separate entry in the rc file. With rc-file delegation, this gives committed rc files an easy way to specify the image to be used without having to set all the remaining arguments for the various just subcommands in "just args". --- src/other_tools/just_mr/launch.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/other_tools/just_mr/launch.cpp') diff --git a/src/other_tools/just_mr/launch.cpp b/src/other_tools/just_mr/launch.cpp index f8f14659..7a7975e7 100644 --- a/src/other_tools/just_mr/launch.cpp +++ b/src/other_tools/just_mr/launch.cpp @@ -35,6 +35,7 @@ auto CallJust(std::optional const& config_file, MultiRepoJustSubCmdsArguments const& just_cmd_args, MultiRepoLogArguments const& log_args, MultiRepoRemoteAuthArguments const& auth_args, + ForwardOnlyArguments const& launch_fwd, bool forward_build_root, std::string multi_repo_tool_name) -> int { // check if subcmd_name can be taken from additional args @@ -50,6 +51,7 @@ auto CallJust(std::optional const& config_file, bool use_launcher{false}; bool supports_defines{false}; bool supports_remote{false}; + bool supports_remote_properties{false}; bool supports_serve{false}; bool supports_dispatch{false}; bool supports_cacert{false}; @@ -89,6 +91,8 @@ auto CallJust(std::optional const& config_file, use_launcher = kKnownJustSubcommands.at(*subcommand).launch; supports_defines = kKnownJustSubcommands.at(*subcommand).defines; supports_remote = kKnownJustSubcommands.at(*subcommand).remote; + supports_remote_properties = + kKnownJustSubcommands.at(*subcommand).remote_props; supports_serve = kKnownJustSubcommands.at(*subcommand).serve; supports_dispatch = kKnownJustSubcommands.at(*subcommand).dispatch; supports_cacert = kKnownJustSubcommands.at(*subcommand).cacert; @@ -190,6 +194,13 @@ auto CallJust(std::optional const& config_file, cmd.emplace_back(auth_args.tls_client_key->string()); } } + // forward-only arguments, still to come before the just-arguments + if (supports_remote_properties) { + for (auto const& prop : launch_fwd.remote_execution_properties) { + cmd.emplace_back("--remote-execution-property"); + cmd.emplace_back(prop); + } + } // add args read from just-mrrc if (subcommand and just_cmd_args.just_args.contains(*subcommand)) { for (auto const& subcmd_arg : just_cmd_args.just_args.at(*subcommand)) { -- cgit v1.2.3