diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-03-22 17:35:17 +0100 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-03-22 19:07:46 +0100 |
commit | d58620bcf328a500b964fd9190f712c96d6a136e (patch) | |
tree | 46347f268ef86fc9955982d5f9d15cf8959fa314 /src/buildtool/main/analyse.cpp | |
parent | e555d27ccfdddcec9bee97263a2fea265ee0d0aa (diff) | |
download | justbuild-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.cpp | 11 |
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, |