summaryrefslogtreecommitdiff
path: root/src/buildtool/build_engine/target_map/target_map.hpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-03-07 15:44:28 +0100
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-03-11 15:59:05 +0100
commit5f6ff55e97104e46c1b5c2c94b39ea0fca35ca7c (patch)
tree9a8a70d311f2c55c20f426258455f9fb3037328a /src/buildtool/build_engine/target_map/target_map.hpp
parentb885deebf9fc02b9f1e849d91de93fadcfb71a73 (diff)
downloadjustbuild-5f6ff55e97104e46c1b5c2c94b39ea0fca35ca7c.tar.gz
just: Replace singletons for progress tracking and statistics...
...with regular instances that have controlled life-times. This avoids race conditions in tracking and reporting the results of analysis and build, as the serve endpoint can orchestrate multiple builds at the same time asynchronously. As a bonus side-effect this also ensures the correctness of the progress reporting per orchestrated build.
Diffstat (limited to 'src/buildtool/build_engine/target_map/target_map.hpp')
-rw-r--r--src/buildtool/build_engine/target_map/target_map.hpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/buildtool/build_engine/target_map/target_map.hpp b/src/buildtool/build_engine/target_map/target_map.hpp
index 2832eb35..eda27b77 100644
--- a/src/buildtool/build_engine/target_map/target_map.hpp
+++ b/src/buildtool/build_engine/target_map/target_map.hpp
@@ -28,6 +28,7 @@
#include "src/buildtool/build_engine/target_map/configured_target.hpp"
#include "src/buildtool/build_engine/target_map/result_map.hpp"
#include "src/buildtool/common/repository_config.hpp"
+#include "src/buildtool/common/statistics.hpp"
#include "src/buildtool/multithreading/async_map_consumer.hpp"
#include "src/buildtool/storage/target_cache.hpp"
@@ -44,6 +45,7 @@ auto CreateTargetMap(
const gsl::not_null<ResultTargetMap*>&,
const gsl::not_null<RepositoryConfig*>&,
const ActiveTargetCache&,
+ const gsl::not_null<Statistics*>& stats,
std::size_t jobs = 0) -> TargetMap;
// use explicit cast to std::function to allow template deduction when used