From 4acf0aa7031836abbb53f9a7816b6a55bab6fcd6 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Tue, 6 Aug 2024 11:02:26 +0200 Subject: analyse: extend provides map when switching to action input When switching from a target to the artifacts that are the inputs of a particular action, the provides map is also switched to provide additional (besides the inputs) information about the action, in particular the command. Extend this provides map with the remaining information, in particular the working directory. --- src/buildtool/main/analyse.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/buildtool/main/analyse.cpp') diff --git a/src/buildtool/main/analyse.cpp b/src/buildtool/main/analyse.cpp index f1d37af9..5783114c 100644 --- a/src/buildtool/main/analyse.cpp +++ b/src/buildtool/main/analyse.cpp @@ -75,6 +75,19 @@ namespace Target = BuildMaps::Target; if (action->GraphAction().MayFail()) { provides["may_fail"] = *(action->GraphAction().MayFail()); } + if (action->GraphAction().NoCache()) { + provides["no_cache"] = true; + } + if (action->GraphAction().TimeoutScale() != 1.0) { + provides["timeout scaling"] = action->GraphAction().TimeoutScale(); + } + if (not action->GraphAction().Cwd().empty()) { + provides["cwd"] = action->GraphAction().Cwd(); + } + if (not action->GraphAction().ExecutionProperties().empty()) { + provides["execution properties"] = + action->GraphAction().ExecutionProperties(); + } auto provides_exp = Expression::FromJson(provides); return std::make_shared( -- cgit v1.2.3