aboutsummaryrefslogtreecommitdiff
path: root/src/libmain
diff options
context:
space:
mode:
Diffstat (limited to 'src/libmain')
-rw-r--r--src/libmain/shared.cc14
-rw-r--r--src/libmain/stack.cc2
2 files changed, 5 insertions, 11 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc
index 52cb23128..a720afd6c 100644
--- a/src/libmain/shared.cc
+++ b/src/libmain/shared.cc
@@ -1,5 +1,3 @@
-#include "config.h"
-
#include "common-args.hh"
#include "globals.hh"
#include "shared.hh"
@@ -114,7 +112,6 @@ void initNix()
opensslLocks = std::vector<std::mutex>(CRYPTO_num_locks());
CRYPTO_set_locking_callback(opensslLockCallback);
- settings.processEnvironment();
settings.loadConfFile();
startSignalHandlerThread();
@@ -170,6 +167,10 @@ struct LegacyArgs : public MixCommonArgs
settings.set("build-fallback", "true");
});
+ mkFlag1('j', "max-jobs", "jobs", "maximum number of parallel builds", [=](std::string s) {
+ settings.set("build-max-jobs", s);
+ });
+
auto intSettingAlias = [&](char shortName, const std::string & longName,
const std::string & description, const std::string & dest) {
mkFlag<unsigned int>(shortName, longName, description, [=](unsigned int n) {
@@ -177,7 +178,6 @@ struct LegacyArgs : public MixCommonArgs
});
};
- intSettingAlias('j', "max-jobs", "maximum number of parallel builds", "build-max-jobs");
intSettingAlias(0, "cores", "maximum number of CPU cores to use inside a build", "build-cores");
intSettingAlias(0, "max-silent-time", "number of seconds of silence before a build is killed", "build-max-silent-time");
intSettingAlias(0, "timeout", "number of seconds before a build is killed", "build-timeout");
@@ -332,11 +332,7 @@ RunPager::~RunPager()
pid.wait();
}
} catch (...) {
- try {
- pid.kill(true);
- } catch (...) {
- ignoreException();
- }
+ ignoreException();
}
}
diff --git a/src/libmain/stack.cc b/src/libmain/stack.cc
index abf59dc4b..57b6a197c 100644
--- a/src/libmain/stack.cc
+++ b/src/libmain/stack.cc
@@ -1,5 +1,3 @@
-#include "config.h"
-
#include "types.hh"
#include <cstring>