Number of make jobs for bootcycle-images target

Erik Joelsson erik.joelsson at
Tue Apr 4 12:19:17 UTC 2017

Hello Alex,

It wasn't a typo, but it was also not correct, as you are pointing out. 
Setting JOBS to $(JOBS) would disable the jobserver for the sub make 
process and also risk flooding a smaller system. What we really need is 
a way to block the setting of -j in the "Init.gmk main" target. 
Something like this seems to work for me:

diff -r 7810f75d016a make/Init.gmk
--- a/make/Init.gmk
+++ b/make/Init.gmk
@@ -303,7 +303,8 @@
          $(call PrepareSmartJavac)
          ( cd $(TOPDIR) && \
              $(NICE) $(MAKE) $(MAKE_ARGS) $(OUTPUT_SYNC_FLAG) \
-                -j $(JOBS) -f make/Main.gmk $(USER_MAKE_VARS) \
+                $(if $(DISABLE_JOBS),, -j $(JOBS)) \
+                -f make/Main.gmk $(USER_MAKE_VARS) \
              ( exitcode=$$? && \
              $(PRINTF) "\nERROR: Build failed for $(TARGET_DESCRIPTION) 
(exit code $$exitcode) \n" \
diff -r 7810f75d016a make/Main.gmk
--- a/make/Main.gmk
+++ b/make/Main.gmk
@@ -320,7 +320,7 @@
          ifneq ($(COMPILE_TYPE), cross)
        $(call LogWarn, Boot cycle build step 2: Building a new JDK 
image using previously built image)
        +$(MAKE) $(MAKE_ARGS) -f $(SRC_ROOT)/make/Init.gmk 
-          JOBS= SPEC=$(dir $(SPEC))bootcycle-spec.gmk main
+          DISABLE_JOBS=true SPEC=$(dir $(SPEC))bootcycle-spec.gmk main
        $(call LogWarn, Boot cycle build disabled when cross compiling)


On 2017-04-04 13:26, Alex Kashchenko wrote:
> Hi,
> Currently in jdk9 bootcycle-images make target is executed with 
> unlimited number of make jobs. May I ask whether "JOBS=" bit here [1] 
> is intentional or just a typo and should be "JOBS=$(JOBS)" instead?
> Current variant works on x86_64 but crashes with native arm32 boot 
> cycle builds - compilation tasks are spawned faster than being executed.
> [1] 

More information about the build-dev mailing list