summaryrefslogtreecommitdiff
path: root/src/buildtool/main/analyse.cpp
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2024-03-22 17:35:17 +0100
committerKlaus Aehlig <klaus.aehlig@huawei.com>2024-03-22 19:07:46 +0100
commitd58620bcf328a500b964fd9190f712c96d6a136e (patch)
tree46347f268ef86fc9955982d5f9d15cf8959fa314 /src/buildtool/main/analyse.cpp
parente555d27ccfdddcec9bee97263a2fea265ee0d0aa (diff)
downloadjustbuild-d58620bcf328a500b964fd9190f712c96d6a136e.tar.gz
Absent target: deduplicate serve calls asking for flexible variables
For an absent export target, the first step of analysis is to ask serve for the flexible variables. The answer to this request is, however, independent of the configuration for this target. So we can avoid calls by caching the answer in an additional map.
Diffstat (limited to 'src/buildtool/main/analyse.cpp')
-rw-r--r--src/buildtool/main/analyse.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/buildtool/main/analyse.cpp b/src/buildtool/main/analyse.cpp
index 6f63e7ab..ab2313e7 100644
--- a/src/buildtool/main/analyse.cpp
+++ b/src/buildtool/main/analyse.cpp
@@ -116,8 +116,15 @@ namespace Target = BuildMaps::Target;
Base::CreateRuleMap(&rule_file_map, &expr_map, repo_config, jobs);
auto source_targets =
Base::CreateSourceTargetMap(&directory_entries, repo_config, jobs);
- auto absent_target_map = Target::CreateAbsentTargetMap(
- result_map, repo_config, stats, &exports_progress, jobs);
+ auto absent_target_variables_map =
+ Target::CreateAbsentTargetVariablesMap(jobs);
+ auto absent_target_map =
+ Target::CreateAbsentTargetMap(result_map,
+ &absent_target_variables_map,
+ repo_config,
+ stats,
+ &exports_progress,
+ jobs);
auto target_map = Target::CreateTargetMap(&source_targets,
&targets_file_map,
&rule_map,