From 9014ee19dbab4708527d7c4d846e5f6773c47bef Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Thu, 22 Jun 2023 09:32:56 +0200 Subject: Add CLI argument to dispatch endpoint In this way, the user can specify which execution endpoint to use depending on the execution properties. --- src/buildtool/main/main.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/buildtool/main/main.cpp') diff --git a/src/buildtool/main/main.cpp b/src/buildtool/main/main.cpp index ceecc77c..846fe257 100644 --- a/src/buildtool/main/main.cpp +++ b/src/buildtool/main/main.cpp @@ -330,6 +330,15 @@ void SetupExecutionConfig(EndpointArguments const& eargs, std::exit(kExitFailure); } } + if (eargs.remote_execution_dispatch_file) { + if (not RemoteConfig::SetRemoteExecutionDispatch( + *eargs.remote_execution_dispatch_file)) { + Logger::Log(LogLevel::Error, + "setting remote execution dispatch based on file '{}'", + eargs.remote_execution_dispatch_file->string()); + std::exit(kExitFailure); + } + } if (rargs.cache_endpoint) { if (not(RemoteConfig::SetCacheAddress(*rargs.cache_endpoint) == (*rargs.cache_endpoint != "local"))) { -- cgit v1.2.3