RFR: JDK-8175271: Race in GenerateLinkOptData.gmk
Erik Joelsson
erik.joelsson at oracle.com
Mon Feb 20 16:02:03 UTC 2017
Hello,
There is a missing dependency declaration in GenerateLinkOptData.gmk. A
rule like the one that generates CLASSLIST_FILE and JLI_TRACE_FILE is
problematic and needs extra care because make can only understand one
target file per rule. In this case we have added a new rule which
depends on JLI_TRACE_FILE, but make does not know this file is created
by the rule for CLASSLIST_FILE so we have to explicitly add that dependency.
Bug: https://bugs.openjdk.java.net/browse/JDK-8175271
Patch:
diff -r a4087bc10a88 make/GenerateLinkOptData.gmk
--- a/make/GenerateLinkOptData.gmk
+++ b/make/GenerateLinkOptData.gmk
@@ -69,7 +69,7 @@
# The jli trace is created by the same recipe as classlist. By
declaring these
# dependencies, make will correctly rebuild both jli trace and classlist
-# incrementally using the single recpie above.
+# incrementally using the single recipe above.
$(CLASSLIST_FILE): $(JLI_TRACE_FILE)
$(JLI_TRACE_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXE_SUFFIX)
$(CLASSLIST_JAR)
@@ -89,6 +89,11 @@
DEST :=
$(JDK_OUTPUTDIR)/modules/jdk.jlink/jdk/tools/jlink/internal/plugins, \
))
+# Because of the single recipe for jli trace and classlist above, the
+# COPY_JLI_TRACE rule needs to explicitly add the classlist file as a
+# prerequisite.
+$(COPY_JLI_TRACE): $(CLASSLIST_FILE)
+
TARGETS += $(COPY_JLI_TRACE)
################################################################################
/Erik
More information about the build-dev
mailing list