diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-12-20 14:18:48 +0100 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2025-01-07 14:18:09 +0100 |
commit | 3f3e5ef52b9788cefe69e0a8d4ae916c17842a62 (patch) | |
tree | a48ee25067a67db20f08d524bb13096de3cbc525 /src/buildtool/main/main.cpp | |
parent | 32c865dce37ff18d796caa9f3cd760eb22edd8f5 (diff) | |
download | justbuild-3f3e5ef52b9788cefe69e0a8d4ae916c17842a62.tar.gz |
Pass BackendDescription to StorageConfig from the outside
Diffstat (limited to 'src/buildtool/main/main.cpp')
-rw-r--r-- | src/buildtool/main/main.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/buildtool/main/main.cpp b/src/buildtool/main/main.cpp index bc159f6c..544027ca 100644 --- a/src/buildtool/main/main.cpp +++ b/src/buildtool/main/main.cpp @@ -134,16 +134,22 @@ void SetupLogging(LogArguments const& clargs) { builder.SetBuildRoot(*eargs.local_root); } + auto backend_description = BackendDescription::Describe( + remote_address, remote_platform_properties, remote_dispatch); + if (not backend_description) { + Logger::Log(LogLevel::Error, std::move(backend_description).error()); + return std::nullopt; + } + auto config = builder.SetHashType(hash_type) - .SetRemoteExecutionArgs( - remote_address, remote_platform_properties, remote_dispatch) + .SetBackendDescription(std::move(backend_description).value()) .Build(); - if (config) { - return *std::move(config); + if (not config) { + Logger::Log(LogLevel::Error, std::move(config).error()); + return std::nullopt; } - Logger::Log(LogLevel::Error, config.error()); - return std::nullopt; + return *std::move(config); } #ifndef BOOTSTRAP_BUILD_TOOL |