8129562: JDK 9 build using boot-jdk classes instead of newly compiled classes
authorjlahoda
Mon, 10 Aug 2015 09:47:35 +0200
changeset 32066 9df3d0e44e64
parent 32063 c25e882cee96
child 32067 ab09cdb2ccb8
8129562: JDK 9 build using boot-jdk classes instead of newly compiled classes Summary: Need to specify empty -extdirs and -endorseddirs to javac to avoid loading of boot JDK classes during build. Reviewed-by: tbell, coffeys, jjg, henryjen
make/CompileJavaModules.gmk
--- a/make/CompileJavaModules.gmk	Wed Jul 05 20:45:01 2017 +0200
+++ b/make/CompileJavaModules.gmk	Mon Aug 10 09:47:35 2015 +0200
@@ -512,8 +512,8 @@
 JDK_USER_DEFINED_FILTER := $(strip $(subst $(COMMA),$(SPACE), $(JDK_FILTER)))
 
 # Create an empty directory to set the bootclasspath to.
-EMPTY_BOOTCLASSPATH := $(SUPPORT_OUTPUTDIR)/empty-dir
-$(call MakeDir, $(EMPTY_BOOTCLASSPATH))
+EMPTY_DIR := $(SUPPORT_OUTPUTDIR)/empty-dir
+$(call MakeDir, $(EMPTY_DIR))
 
 # This macro sets up compilation of a module and declares dependencies for it.
 # Param 1 - module name
@@ -534,7 +534,7 @@
     $1_CLASSPATH := $$($1_CLASSPATH) $$(addprefix $(JDK_OUTPUTDIR)/modules/,jdk.hotspot.agent)
   endif
   $1_CLASSPATH := $$(subst $$(SPACE),$$(PATH_SEP),$$($1_CLASSPATH))
-  $1_JAVAC_FLAGS := -bootclasspath $(EMPTY_BOOTCLASSPATH) -classpath "$$($1_CLASSPATH)" $$($1_ADD_JAVAC_FLAGS)
+  $1_JAVAC_FLAGS := -bootclasspath $(EMPTY_DIR) -extdirs $(EMPTY_DIR) -endorseddirs $(EMPTY_DIR) -classpath "$$($1_CLASSPATH)" $$($1_ADD_JAVAC_FLAGS)
 
   $$(eval $$(call SetupJavaCompilation,$1, \
       SETUP := $$(if $$($1_SETUP), $$($1_SETUP), GENERATE_JDKBYTECODE), \