diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-01-30 16:07:49 +0100 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-01-31 10:20:01 +0100 |
commit | 8a4a900f93a704f18d5489b682508840a8cda179 (patch) | |
tree | 08dbac7941e596c8ab5a3eae2808fc8c4bee8d25 /src/other_tools/just_mr/launch.cpp | |
parent | e2168c51eb9d29542b32aaf7bca24595d0745749 (diff) | |
download | justbuild-8a4a900f93a704f18d5489b682508840a8cda179.tar.gz |
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".
Diffstat (limited to 'src/other_tools/just_mr/launch.cpp')
-rw-r--r-- | src/other_tools/just_mr/launch.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
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<std::filesystem::path> 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<std::filesystem::path> 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<std::filesystem::path> 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<std::filesystem::path> 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)) { |