diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-08-06 11:02:26 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-08-06 12:46:08 +0200 |
commit | 4acf0aa7031836abbb53f9a7816b6a55bab6fcd6 (patch) | |
tree | a40aaf7af5cacbdc9a4ec8002bddee135c492803 /src | |
parent | 51da1899e8b46e8f445c46a57dc57fff7076fd23 (diff) | |
download | justbuild-4acf0aa7031836abbb53f9a7816b6a55bab6fcd6.tar.gz |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/buildtool/main/analyse.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
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<AnalysedTarget const>( |