diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-07-09 14:36:54 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-07-12 15:13:52 +0200 |
commit | 5057bd9e9a55fd8423ad7112086a3cafd3162e2c (patch) | |
tree | f96e51b2f8a24eb4f2553855bac8044c3b60f40d /src/buildtool/execution_api/local/local_action.hpp | |
parent | 2e2a3083a21823aa04afa0f02c38b612ca4d1045 (diff) | |
download | justbuild-5057bd9e9a55fd8423ad7112086a3cafd3162e2c.tar.gz |
Pack arguments of CreateActionDigestFromCommandLine to a struct
Diffstat (limited to 'src/buildtool/execution_api/local/local_action.hpp')
-rw-r--r-- | src/buildtool/execution_api/local/local_action.hpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/buildtool/execution_api/local/local_action.hpp b/src/buildtool/execution_api/local/local_action.hpp index a6c69b29..7999da33 100644 --- a/src/buildtool/execution_api/local/local_action.hpp +++ b/src/buildtool/execution_api/local/local_action.hpp @@ -98,16 +98,19 @@ class LocalAction final : public IExecutionAction { [[nodiscard]] auto CreateActionDigest(bazel_re::Digest const& exec_dir, bool do_not_cache) -> bazel_re::Digest { - return BazelMsgFactory::CreateActionDigestFromCommandLine( - cmdline_, - exec_dir, - output_files_, - output_dirs_, - BazelMsgFactory::CreateMessageVectorFromMap< - bazel_re::Command_EnvironmentVariable>(env_vars_), - properties_, - do_not_cache, - timeout_); + auto const env_vars = BazelMsgFactory::CreateMessageVectorFromMap< + bazel_re::Command_EnvironmentVariable>(env_vars_); + + BazelMsgFactory::ActionDigestRequest request{ + .command_line = &cmdline_, + .output_files = &output_files_, + .output_dirs = &output_dirs_, + .env_vars = &env_vars, + .properties = &properties_, + .exec_dir = &exec_dir, + .timeout = timeout_, + .skip_action_cache = do_not_cache}; + return BazelMsgFactory::CreateActionDigestFromCommandLine(request); } [[nodiscard]] auto Run(bazel_re::Digest const& action_id) const noexcept |