Skip to content

Commit 9b1eebc

Browse files
committed
8255620: Build race between modulegraphs and exploded-image-optimize targets
Reviewed-by: tbell
1 parent 3fd8216 commit 9b1eebc

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

make/Main.gmk

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ $(eval $(call SetupTarget, test-image-demos-jdk, \
338338

339339
$(eval $(call SetupTarget, generate-summary, \
340340
MAKEFILE := GenerateModuleSummary, \
341-
DEPS := jmods buildtools-modules, \
341+
DEPS := jmods buildtools-modules runnable-buildjdk, \
342342
))
343343

344344
################################################################################
@@ -468,7 +468,7 @@ $(eval $(call SetupTarget, docs-jdk-api-javadoc, \
468468
$(eval $(call SetupTarget, docs-jdk-api-modulegraph, \
469469
MAKEFILE := Docs, \
470470
TARGET := docs-jdk-api-modulegraph, \
471-
DEPS := buildtools-modules, \
471+
DEPS := buildtools-modules runnable-buildjdk, \
472472
))
473473

474474
$(eval $(call SetupTarget, docs-javase-api-javadoc, \
@@ -479,7 +479,7 @@ $(eval $(call SetupTarget, docs-javase-api-javadoc, \
479479
$(eval $(call SetupTarget, docs-javase-api-modulegraph, \
480480
MAKEFILE := Docs, \
481481
TARGET := docs-javase-api-modulegraph, \
482-
DEPS := buildtools-modules, \
482+
DEPS := buildtools-modules runnable-buildjdk, \
483483
))
484484

485485
$(eval $(call SetupTarget, docs-reference-api-javadoc, \
@@ -490,7 +490,7 @@ $(eval $(call SetupTarget, docs-reference-api-javadoc, \
490490
$(eval $(call SetupTarget, docs-reference-api-modulegraph, \
491491
MAKEFILE := Docs, \
492492
TARGET := docs-reference-api-modulegraph, \
493-
DEPS := buildtools-modules, \
493+
DEPS := buildtools-modules runnable-buildjdk, \
494494
))
495495

496496
# The gensrc steps for jdk.jdi create html spec files.
@@ -1083,6 +1083,18 @@ ifneq ($(COMPILE_TYPE), cross)
10831083
exploded-image: exploded-image-optimize
10841084
endif
10851085

1086+
# The runnable-buildjdk target guarantees that the buildjdk is done
1087+
# building and ready to be used. The exact set of dependencies it needs
1088+
# depends on what kind of buildjdk is used for the current configuration.
1089+
runnable-buildjdk:
1090+
ifeq ($(CREATE_BUILDJDK), true)
1091+
ifneq ($(CREATING_BUILDJDK), true)
1092+
runnable-buildjdk: create-buildjdk
1093+
endif
1094+
else ifeq ($(EXTERNAL_BUILDJDK), false)
1095+
runnable-buildjdk: exploded-image
1096+
endif
1097+
10861098
create-buildjdk: create-buildjdk-interim-image
10871099

10881100
docs-jdk-api: docs-jdk-api-javadoc
@@ -1186,7 +1198,7 @@ all-bundles: product-bundles test-bundles docs-bundles static-libs-bundles
11861198
ALL_TARGETS += buildtools hotspot hotspot-libs hotspot-gensrc gensrc gendata \
11871199
copy java libs static-libs launchers jmods \
11881200
jdk.jdwp.agent-gensrc $(ALL_MODULES) demos \
1189-
exploded-image-base exploded-image \
1201+
exploded-image-base exploded-image runnable-buildjdk \
11901202
create-buildjdk docs-jdk-api docs-javase-api docs-reference-api docs-jdk \
11911203
docs-javase docs-reference docs-javadoc mac-bundles product-images legacy-images \
11921204
docs-image docs-javase-image docs-reference-image all-docs-images \

0 commit comments

Comments
 (0)