From 75303a619ecb07a7e47b1d092319653927afd55a Mon Sep 17 00:00:00 2001 From: bryan Date: Fri, 15 Nov 2024 13:58:14 -0500 Subject: [PATCH] Use single-threaded make for --debug --- openwrtbuilder | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openwrtbuilder b/openwrtbuilder index b8d4bde..230fcfd 100755 --- a/openwrtbuilder +++ b/openwrtbuilder @@ -579,9 +579,10 @@ from_source() { #execute make "${make_opts[@]}" "-j1" dirclean # TODO 'dirclean' has a bug that triggers menuconfig execute make "${make_opts[@]}" "-j1" defconfig execute make "${make_opts[@]}" "-j1" download + ((DEBUG)) && make_opts+=("-j1") || make_opts+=("-j$(($(nproc)+1))") # Make image - if ! execute ionice -c 3 chrt --idle 0 nice -n19 make "${make_opts[@]}" "-j$(($(nproc)+1))" world; then + if ! execute ionice -c 3 chrt --idle 0 nice -n19 make "${make_opts[@]}" world; then echo "Error: make failed" return 1 fi