aboutsummaryrefslogtreecommitdiff
path: root/src/build-remote/build-remote.cc
diff options
context:
space:
mode:
authorYorick van Pelt <yorick@yorickvanpelt.nl>2023-02-07 12:08:00 +0100
committerYorick van Pelt <yorick@yorickvanpelt.nl>2023-02-07 12:08:00 +0100
commit631ba6442a2fd2475b213cd463ca811d21761f36 (patch)
tree693841ffc188d40475fabd5c1be162985a4f0530 /src/build-remote/build-remote.cc
parent3050005211951a1053e79634b1eb2fee1ad30a90 (diff)
build-remote: store maxBuildJobs before forcing it to 1
Diffstat (limited to 'src/build-remote/build-remote.cc')
-rw-r--r--src/build-remote/build-remote.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/build-remote/build-remote.cc b/src/build-remote/build-remote.cc
index e197af847..174435e7c 100644
--- a/src/build-remote/build-remote.cc
+++ b/src/build-remote/build-remote.cc
@@ -72,6 +72,7 @@ static int main_build_remote(int argc, char * * argv)
settings.set(name, value);
}
+ auto maxBuildJobs = settings.maxBuildJobs;
settings.maxBuildJobs.set("1"); // hack to make tests with local?root= work
initPlugins();
@@ -114,7 +115,7 @@ static int main_build_remote(int argc, char * * argv)
/* It would be possible to build locally after some builds clear out,
so don't show the warning now: */
- bool couldBuildLocally = settings.maxBuildJobs > 0
+ bool couldBuildLocally = maxBuildJobs > 0
&& ( neededSystem == settings.thisSystem
|| settings.extraPlatforms.get().count(neededSystem) > 0)
&& allSupportedLocally(*store, requiredFeatures);