From 71ffe14b0083c9c4975f66db4127de9ee5b9a84d Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Fri, 20 Dec 2024 16:34:04 +0100 Subject: Add backend description to CAS in a ctor of TargetCache ...instead of adding it preliminarily. --- src/buildtool/main/main.cpp | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'src/buildtool/main/main.cpp') diff --git a/src/buildtool/main/main.cpp b/src/buildtool/main/main.cpp index 544027ca..d125041f 100644 --- a/src/buildtool/main/main.cpp +++ b/src/buildtool/main/main.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -248,23 +247,6 @@ void SetupFileChunker() { FileChunker::Initialize(); } -/// \brief Write backend description (which determines the target cache shard) -/// to CAS. -void StoreTargetCacheShard( - Storage const& storage, - RemoteExecutionConfig const& remote_exec_config) noexcept { - auto backend_description = - BackendDescription::Describe(remote_exec_config.remote_address, - remote_exec_config.platform_properties, - remote_exec_config.dispatch); - if (not backend_description) { - Logger::Log(LogLevel::Error, backend_description.error()); - std::exit(kExitFailure); - } - std::ignore = - storage.CAS().StoreBlob(backend_description->GetDescription()); -} - #endif // BOOTSTRAP_BUILD_TOOL // returns path relative to `root`. @@ -820,7 +802,6 @@ auto main(int argc, char* argv[]) -> int { return kExitFailure; } auto const storage = Storage::Create(&*storage_config); - StoreTargetCacheShard(storage, remote_exec_config); // pack the local context instances to be passed as needed LocalContext const local_context{ @@ -886,7 +867,6 @@ auto main(int argc, char* argv[]) -> int { return kExitFailure; } auto const storage = Storage::Create(&*storage_config); - StoreTargetCacheShard(storage, *remote_exec_config); // pack the local context instances to be passed as needed LocalContext const local_context{ @@ -967,10 +947,6 @@ auto main(int argc, char* argv[]) -> int { } auto const storage = Storage::Create(&*storage_config); -#ifndef BOOTSTRAP_BUILD_TOOL - StoreTargetCacheShard(storage, *remote_exec_config); -#endif // BOOTSTRAP_BUILD_TOOL - auto jobs = arguments.build.build_jobs > 0 ? arguments.build.build_jobs : arguments.common.jobs; -- cgit v1.2.3