summaryrefslogtreecommitdiff
path: root/src/buildtool/serve_api/serve_service/target.cpp
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-06-11 13:19:38 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-06-18 12:05:10 +0200
commit60a056f0b01515ad70ff99d08dd3d2b7475c6c37 (patch)
tree4fd4de8710e29582f6843e32c703f5451717d572 /src/buildtool/serve_api/serve_service/target.cpp
parent26fdbae5f7269c06f95d3d087e657bb192b909d1 (diff)
downloadjustbuild-60a056f0b01515ad70ff99d08dd3d2b7475c6c37.tar.gz
Pass ServeApi as a field of context to the analysis
...instead of using singleton calls.
Diffstat (limited to 'src/buildtool/serve_api/serve_service/target.cpp')
-rw-r--r--src/buildtool/serve_api/serve_service/target.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/buildtool/serve_api/serve_service/target.cpp b/src/buildtool/serve_api/serve_service/target.cpp
index 5f6f038f..afa98b24 100644
--- a/src/buildtool/serve_api/serve_service/target.cpp
+++ b/src/buildtool/serve_api/serve_service/target.cpp
@@ -39,6 +39,7 @@
#include "src/buildtool/progress_reporting/progress.hpp"
#include "src/buildtool/progress_reporting/progress_reporter.hpp"
#include "src/buildtool/serve_api/remote/config.hpp"
+#include "src/buildtool/serve_api/remote/serve_api.hpp"
#include "src/buildtool/serve_api/serve_service/target_utils.hpp"
#include "src/buildtool/storage/config.hpp"
#include "src/buildtool/storage/storage.hpp"
@@ -453,6 +454,12 @@ auto TargetService::ServeTarget(
.statistics = &stats,
.progress = &progress};
+#ifndef BOOTSTRAP_BUILD_TOOL
+ if (RemoteServeConfig::Instance().RemoteAddress()) {
+ analyse_ctx.serve = &ServeApi::Instance();
+ }
+#endif // BOOTSTRAP_BUILD_TOOL
+
// analyse the configured target
auto result = AnalyseTarget(&analyse_ctx,
configured_target,