[openwrt/openwrt] build: use ninja for cmake packages by default

LEDE Commits lede-commits at lists.infradead.org
Sat Jun 12 01:47:14 PDT 2021


nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/0c7c24d40aedcee25d5243e25a87d38246be128b

commit 0c7c24d40aedcee25d5243e25a87d38246be128b
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Jun 10 14:01:04 2021 +0200

    build: use ninja for cmake packages by default
    
    Speed goes from:
    
    Executed in     178.08 secs     fish            external
    usr time        20.16 mins      509.00 micros   20.16 mins
    sys time        2.88 mins       39.00 micros    2.88 mins
    
    To:
    
    Executed in     175.90 secs     fish            external
    usr time        20.19 mins      0.00 micros     20.19 mins
    sys time        2.85 mins       497.00 micros   2.85 mins
    
    Tested with "time make -j 12" on AMD Ryzen 3600
    
    When building individual packages, the build time difference is often
    significantly bigger than that.
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 include/cmake.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/cmake.mk b/include/cmake.mk
index 8a1c4fc4d5..7ccd872365 100644
--- a/include/cmake.mk
+++ b/include/cmake.mk
@@ -1,5 +1,7 @@
 cmake_bool = $(patsubst %,-D%:BOOL=$(if $($(1)),ON,OFF),$(2))
 
+PKG_USE_NINJA ?= 1
+HOST_USE_NINJA ?= 1
 ifeq ($(PKG_USE_NINJA),1)
   PKG_BUILD_PARALLEL ?= 1
 endif



More information about the lede-commits mailing list