From 03f948f4b10e916052a2234448b6658b80ee9143 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Thu, 1 Aug 2024 10:26:13 +0200 Subject: Execution API: support cwd ... following the remote-execution standard that all output paths (but none of the input paths) are relative to the working directory. Therefore, the executor has to do the path translation. For our implementation of the API interface - the local API now handles cwd correctly, - the remote API forwards cwd correctly, and - the git API continues to report actions as not implemented. --- src/buildtool/execution_api/common/execution_api.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/buildtool/execution_api/common/execution_api.hpp') diff --git a/src/buildtool/execution_api/common/execution_api.hpp b/src/buildtool/execution_api/common/execution_api.hpp index 2108c68d..c9ee276b 100644 --- a/src/buildtool/execution_api/common/execution_api.hpp +++ b/src/buildtool/execution_api/common/execution_api.hpp @@ -46,7 +46,8 @@ class IExecutionApi { /// \brief Create a new action. /// \param[in] root_digest Digest of the build root. /// \param[in] command Command as argv vector - /// \param[in] output_files List of paths to output files. + /// \param[in] cwd Working direcotry, relative to execution root + /// \param[in] output_files List of paths to output files, relative to cwd /// \param[in] output_dirs List of paths to output directories. /// \param[in] env_vars The environment variables to set. /// \param[in] properties Platform properties to set. @@ -54,6 +55,7 @@ class IExecutionApi { [[nodiscard]] virtual auto CreateAction( ArtifactDigest const& root_digest, std::vector const& command, + std::string const& cwd, std::vector const& output_files, std::vector const& output_dirs, std::map const& env_vars, -- cgit v1.2.3