summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/buildtool/execution_api/common/TARGETS2
-rw-r--r--src/buildtool/execution_api/common/api_bundle.cpp15
-rw-r--r--src/buildtool/execution_api/common/api_bundle.hpp2
-rw-r--r--src/buildtool/main/main.cpp3
-rw-r--r--src/buildtool/serve_api/serve_service/TARGETS1
-rw-r--r--src/buildtool/serve_api/serve_service/target.cpp2
-rw-r--r--src/other_tools/just_mr/TARGETS2
-rw-r--r--src/other_tools/just_mr/fetch.cpp2
-rw-r--r--src/other_tools/just_mr/setup.cpp2
9 files changed, 23 insertions, 8 deletions
diff --git a/src/buildtool/execution_api/common/TARGETS b/src/buildtool/execution_api/common/TARGETS
index 2e5d14dd..8237b350 100644
--- a/src/buildtool/execution_api/common/TARGETS
+++ b/src/buildtool/execution_api/common/TARGETS
@@ -45,12 +45,12 @@
, ["src/buildtool/auth", "auth"]
, ["src/buildtool/common", "config"]
, ["src/buildtool/common/remote", "remote_common"]
+ , ["src/buildtool/execution_api/local", "config"]
, ["src/buildtool/storage", "config"]
, ["src/buildtool/storage", "storage"]
]
, "private-deps":
[ ["src/buildtool/execution_api/bazel_msg", "bazel_msg"]
- , ["src/buildtool/execution_api/local", "config"]
, ["src/buildtool/execution_api/local", "local"]
, ["src/buildtool/execution_api/remote", "bazel"]
]
diff --git a/src/buildtool/execution_api/common/api_bundle.cpp b/src/buildtool/execution_api/common/api_bundle.cpp
index 411fb02f..0c763493 100644
--- a/src/buildtool/execution_api/common/api_bundle.cpp
+++ b/src/buildtool/execution_api/common/api_bundle.cpp
@@ -15,18 +15,19 @@
#include "src/buildtool/execution_api/common/api_bundle.hpp"
#include "src/buildtool/execution_api/bazel_msg/bazel_common.hpp"
-#include "src/buildtool/execution_api/local/config.hpp"
#include "src/buildtool/execution_api/local/local_api.hpp"
#include "src/buildtool/execution_api/remote/bazel/bazel_api.hpp"
-ApiBundle::ApiBundle(gsl::not_null<StorageConfig const*> const& storage_config,
- gsl::not_null<Storage const*> const& storage,
- RepositoryConfig const* repo_config,
- gsl::not_null<Auth const*> const& authentication,
- std::optional<ServerAddress> const& remote_address)
+ApiBundle::ApiBundle(
+ gsl::not_null<StorageConfig const*> const& storage_config,
+ gsl::not_null<Storage const*> const& storage,
+ gsl::not_null<LocalExecutionConfig const*> const& local_exec_config,
+ RepositoryConfig const* repo_config,
+ gsl::not_null<Auth const*> const& authentication,
+ std::optional<ServerAddress> const& remote_address)
: local{std::make_shared<LocalApi>(storage_config,
storage,
- &LocalExecutionConfig::Instance(),
+ local_exec_config,
repo_config)}, // needed by remote
auth{*authentication}, // needed by remote
remote{CreateRemote(remote_address)} {}
diff --git a/src/buildtool/execution_api/common/api_bundle.hpp b/src/buildtool/execution_api/common/api_bundle.hpp
index 3c084c0d..ca2e91d1 100644
--- a/src/buildtool/execution_api/common/api_bundle.hpp
+++ b/src/buildtool/execution_api/common/api_bundle.hpp
@@ -23,6 +23,7 @@
#include "src/buildtool/common/remote/remote_common.hpp"
#include "src/buildtool/common/repository_config.hpp"
#include "src/buildtool/execution_api/common/execution_api.hpp"
+#include "src/buildtool/execution_api/local/config.hpp"
#include "src/buildtool/storage/config.hpp"
#include "src/buildtool/storage/storage.hpp"
@@ -33,6 +34,7 @@ struct ApiBundle final {
explicit ApiBundle(
gsl::not_null<StorageConfig const*> const& storage_config,
gsl::not_null<Storage const*> const& storage,
+ gsl::not_null<LocalExecutionConfig const*> const& local_exec_config,
RepositoryConfig const* repo_config,
gsl::not_null<Auth const*> const& authentication,
std::optional<ServerAddress> const& remote_address);
diff --git a/src/buildtool/main/main.cpp b/src/buildtool/main/main.cpp
index aed5a6eb..5b42507a 100644
--- a/src/buildtool/main/main.cpp
+++ b/src/buildtool/main/main.cpp
@@ -822,6 +822,7 @@ auto main(int argc, char* argv[]) -> int {
SetupExecutionServiceConfig(arguments.service);
ApiBundle const exec_apis{&*storage_config,
&storage,
+ &LocalExecutionConfig::Instance(),
/*repo_config=*/nullptr,
&*auth_config,
RemoteExecutionConfig::RemoteAddress()};
@@ -850,6 +851,7 @@ auto main(int argc, char* argv[]) -> int {
ApiBundle const serve_apis{
&*storage_config,
&storage,
+ &LocalExecutionConfig::Instance(),
/*repo_config=*/nullptr,
&*auth_config,
RemoteExecutionConfig::RemoteAddress()};
@@ -919,6 +921,7 @@ auto main(int argc, char* argv[]) -> int {
}
ApiBundle const main_apis{&*storage_config,
&storage,
+ &LocalExecutionConfig::Instance(),
&repo_config,
&*auth_config,
RemoteExecutionConfig::RemoteAddress()};
diff --git a/src/buildtool/serve_api/serve_service/TARGETS b/src/buildtool/serve_api/serve_service/TARGETS
index b5564fb5..e390987f 100644
--- a/src/buildtool/serve_api/serve_service/TARGETS
+++ b/src/buildtool/serve_api/serve_service/TARGETS
@@ -102,6 +102,7 @@
, ["src/buildtool/build_engine/target_map", "configured_target"]
, ["src/buildtool/build_engine/target_map", "result_map"]
, ["src/buildtool/common/remote", "remote_common"]
+ , ["src/buildtool/execution_api/local", "config"]
, ["src/buildtool/execution_api/remote", "config"]
, ["src/buildtool/file_system", "file_system_manager"]
, ["src/buildtool/graph_traverser", "graph_traverser"]
diff --git a/src/buildtool/serve_api/serve_service/target.cpp b/src/buildtool/serve_api/serve_service/target.cpp
index 163f9217..a2d0ce53 100644
--- a/src/buildtool/serve_api/serve_service/target.cpp
+++ b/src/buildtool/serve_api/serve_service/target.cpp
@@ -27,6 +27,7 @@
#include "src/buildtool/common/artifact.hpp"
#include "src/buildtool/common/repository_config.hpp"
#include "src/buildtool/common/statistics.hpp"
+#include "src/buildtool/execution_api/local/config.hpp"
#include "src/buildtool/execution_api/remote/config.hpp"
#include "src/buildtool/file_system/file_system_manager.hpp"
#include "src/buildtool/file_system/object_type.hpp"
@@ -501,6 +502,7 @@ auto TargetService::ServeTarget(
// traversing.
ApiBundle const local_apis{&storage_config_,
&storage_,
+ &LocalExecutionConfig::Instance(),
&repository_config,
&apis_.auth,
address};
diff --git a/src/other_tools/just_mr/TARGETS b/src/other_tools/just_mr/TARGETS
index a303a3a7..560a08f6 100644
--- a/src/other_tools/just_mr/TARGETS
+++ b/src/other_tools/just_mr/TARGETS
@@ -130,6 +130,7 @@
, "setup_utils"
, ["src/buildtool/execution_api/common", "common"]
, ["src/buildtool/execution_api/common", "api_bundle"]
+ , ["src/buildtool/execution_api/local", "config"]
, ["src/buildtool/execution_api/remote", "config"]
, ["src/buildtool/serve_api/remote", "config"]
, ["src/buildtool/serve_api/remote", "serve_api"]
@@ -195,6 +196,7 @@
, "setup_utils"
, ["src/buildtool/execution_api/common", "common"]
, ["src/buildtool/execution_api/common", "api_bundle"]
+ , ["src/buildtool/execution_api/local", "config"]
, ["src/buildtool/execution_api/remote", "config"]
, ["src/buildtool/serve_api/remote", "config"]
, ["src/buildtool/serve_api/remote", "serve_api"]
diff --git a/src/other_tools/just_mr/fetch.cpp b/src/other_tools/just_mr/fetch.cpp
index 147c8ad6..6b247e7c 100644
--- a/src/other_tools/just_mr/fetch.cpp
+++ b/src/other_tools/just_mr/fetch.cpp
@@ -23,6 +23,7 @@
#include "src/buildtool/auth/authentication.hpp"
#include "src/buildtool/execution_api/common/api_bundle.hpp"
#include "src/buildtool/execution_api/common/execution_api.hpp"
+#include "src/buildtool/execution_api/local/config.hpp"
#include "src/buildtool/execution_api/remote/config.hpp"
#include "src/buildtool/logging/log_level.hpp"
#include "src/buildtool/logging/logger.hpp"
@@ -408,6 +409,7 @@ auto MultiRepoFetch(std::shared_ptr<Configuration> const& config,
ApiBundle const apis{&storage_config,
&storage,
+ &LocalExecutionConfig::Instance(),
/*repo_config=*/nullptr,
&*auth_config,
RemoteExecutionConfig::RemoteAddress()};
diff --git a/src/other_tools/just_mr/setup.cpp b/src/other_tools/just_mr/setup.cpp
index cc959412..10c15312 100644
--- a/src/other_tools/just_mr/setup.cpp
+++ b/src/other_tools/just_mr/setup.cpp
@@ -25,6 +25,7 @@
#include "src/buildtool/auth/authentication.hpp"
#include "src/buildtool/execution_api/common/api_bundle.hpp"
#include "src/buildtool/execution_api/common/execution_api.hpp"
+#include "src/buildtool/execution_api/local/config.hpp"
#include "src/buildtool/execution_api/remote/config.hpp"
#include "src/buildtool/file_system/symlinks_map/resolve_symlinks_map.hpp"
#include "src/buildtool/logging/log_level.hpp"
@@ -127,6 +128,7 @@ auto MultiRepoSetup(std::shared_ptr<Configuration> const& config,
ApiBundle const apis{&storage_config,
&storage,
+ &LocalExecutionConfig::Instance(),
/*repo_config=*/nullptr,
&*auth_config,
RemoteExecutionConfig::RemoteAddress()};