summaryrefslogtreecommitdiffstats
path: root/rules.mk
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2021-06-06 14:31:01 +0200
committerFelix Fietkau <nbd@nbd.name>2021-06-12 10:46:39 +0200
commit97258f53634d7237a2962aec3387f011047ce83b (patch)
tree24966f800bdf95b4f3ef3126772f5017c78c0c2e /rules.mk
parenta85aaa1bc299301ad741b6ef94d7580c9095f1be (diff)
downloadopenwrt-97258f53634d7237a2962aec3387f011047ce83b.tar.gz
openwrt-97258f53634d7237a2962aec3387f011047ce83b.tar.bz2
openwrt-97258f53634d7237a2962aec3387f011047ce83b.zip
build: add ninja build tool and make it available for cmake
ninja is faster at building cmake packages than make, and according to reports also more reliable at handling parallel builds This commit includes a patch that adds GNU make jobserver support, in order to allow more precise control over the number of parallel tasks Enable parallel build by default for packages using ninja Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'rules.mk')
-rw-r--r--rules.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/rules.mk b/rules.mk
index 51f822e3f1..8b24d3a3bb 100644
--- a/rules.mk
+++ b/rules.mk
@@ -342,6 +342,12 @@ else
$(SCRIPT_DIR)/rstrip.sh
endif
+NINJA = \
+ MAKEFLAGS="$(MAKE_JOBSERVER)" \
+ $(STAGING_DIR_HOST)/bin/ninja \
+ $(if $(findstring c,$(OPENWRT_VERBOSE)),-v) \
+ $(if $(MAKE_JOBSERVER),,-j1)
+
ifeq ($(CONFIG_IPV6),y)
DISABLE_IPV6:=
else