559 |
559 |
560 |
560 |
561 BUILD_JAVA_FLAGS := @BOOTCYCLE_JVM_ARGS_BIG@ |
561 BUILD_JAVA_FLAGS := @BOOTCYCLE_JVM_ARGS_BIG@ |
562 BUILD_JAVA=@FIXPATH@ $(BUILD_JDK)/bin/java $(BUILD_JAVA_FLAGS) |
562 BUILD_JAVA=@FIXPATH@ $(BUILD_JDK)/bin/java $(BUILD_JAVA_FLAGS) |
563 |
563 |
564 # Use ?= as this can be overridden from bootcycle-spec.gmk |
564 # Interim langtools and rmic modules and arguments |
565 BOOT_JDK_MODULAR ?= @BOOT_JDK_MODULAR@ |
565 INTERIM_LANGTOOLS_BASE_MODULES := java.compiler jdk.compiler jdk.jdeps jdk.javadoc |
566 |
566 INTERIM_LANGTOOLS_MODULES := $(addsuffix .interim, $(INTERIM_LANGTOOLS_BASE_MODULES)) |
567 INTERIM_LANGTOOLS_OVERRIDE_MODULES := java.compiler jdk.compiler \ |
567 INTERIM_LANGTOOLS_ADD_EXPORTS := \ |
568 jdk.jdeps jdk.javadoc |
568 --add-exports java.base/sun.reflect.annotation=jdk.compiler.interim \ |
569 INTERIM_RMIC_OVERRIDE_MODULES := jdk.rmic |
569 --add-exports java.base/jdk.internal.util.jar=jdk.jdeps.interim \ |
570 ifeq ($(BOOT_JDK_MODULAR), true) |
570 --add-exports java.base/jdk.internal.misc=jdk.jdeps.interim \ |
571 INTERIM_LANGTOOLS_OVERRIDE_MODULES_ARGS = $(foreach m, \ |
571 # |
572 $(INTERIM_LANGTOOLS_OVERRIDE_MODULES), \ |
572 INTERIM_LANGTOOLS_MODULES_COMMA := $(strip $(subst $(SPACE),$(COMMA),$(strip \ |
573 --patch-module $m=$(BUILDTOOLS_OUTPUTDIR)/override_modules/$m) |
573 $(INTERIM_LANGTOOLS_MODULES)))) |
574 INTERIM_RMIC_OVERRIDE_MODULES_ARGS = $(foreach m, \ |
574 INTERIM_LANGTOOLS_ARGS := \ |
575 $(INTERIM_LANGTOOLS_OVERRIDE_MODULES) \ |
575 --limit-modules java.base,jdk.zipfs,$(INTERIM_LANGTOOLS_MODULES_COMMA) \ |
576 $(INTERIM_RMIC_OVERRIDE_MODULES), \ |
576 --add-modules $(INTERIM_LANGTOOLS_MODULES_COMMA) \ |
577 --patch-module $m=$(BUILDTOOLS_OUTPUTDIR)/override_modules/$m) |
577 --module-path $(BUILDTOOLS_OUTPUTDIR)/interim_modules \ |
578 INTERIM_LANGTOOLS_ARGS = $(INTERIM_LANGTOOLS_OVERRIDE_MODULES_ARGS) |
578 $(INTERIM_LANGTOOLS_ADD_EXPORTS) \ |
579 JAVAC_MAIN_CLASS = -m jdk.compiler/com.sun.tools.javac.Main |
579 # |
580 JAVADOC_MAIN_CLASS = -m jdk.javadoc/jdk.javadoc.internal.tool.Main |
580 JAVAC_MAIN_CLASS = -m jdk.compiler.interim/com.sun.tools.javac.Main |
581 else |
581 JAVADOC_MAIN_CLASS = -m jdk.javadoc.interim/jdk.javadoc.internal.tool.Main |
582 INTERIM_LANGTOOLS_OVERRIDE_MODULES_ARGS = \ |
582 |
583 -Xbootclasspath/p:$(call PathList, \ |
583 INTERIM_RMIC_BASE_MODULES := jdk.rmic |
584 $(addprefix $(BUILDTOOLS_OUTPUTDIR)/override_modules/, \ |
584 INTERIM_RMIC_MODULES := $(addsuffix .interim, $(INTERIM_RMIC_BASE_MODULES)) |
585 $(INTERIM_LANGTOOLS_OVERRIDE_MODULES))) |
585 INTERIM_RMIC_ADD_EXPORTS := \ |
586 INTERIM_RMIC_OVERRIDE_MODULES_ARGS = \ |
586 --add-exports java.corba/com.sun.corba.se.impl.util=jdk.rmic.interim \ |
587 -Xbootclasspath/p:$(call PathList, \ |
587 # |
588 $(addprefix $(BUILDTOOLS_OUTPUTDIR)/override_modules/, \ |
588 INTERIM_RMIC_ARGS := --limit-modules java.base,jdk.compiler,jdk.javadoc,java.corba \ |
589 $(INTERIM_LANGTOOLS_OVERRIDE_MODULES) \ |
589 --module-path $(BUILDTOOLS_OUTPUTDIR)/interim_modules \ |
590 $(INTERIM_RMIC_OVERRIDE_MODULES))) |
590 $(INTERIM_RMIC_ADD_EXPORTS) \ |
591 INTERIM_LANGTOOLS_ARGS = $(INTERIM_LANGTOOLS_OVERRIDE_MODULES_ARGS) \ |
591 # |
592 -cp $(BUILDTOOLS_OUTPUTDIR)/override_modules/jdk.compiler |
592 |
593 JAVAC_MAIN_CLASS = com.sun.tools.javac.Main |
|
594 JAVADOC_MAIN_CLASS = jdk.javadoc.internal.tool.Main |
|
595 endif |
|
596 # You run the new javac using the boot jdk with $(BOOT_JDK)/bin/java $(NEW_JAVAC) ... |
593 # You run the new javac using the boot jdk with $(BOOT_JDK)/bin/java $(NEW_JAVAC) ... |
597 # Use = assignment to be able to override in bootcycle-spec.gmk |
594 # Use = assignment to be able to override in bootcycle-spec.gmk |
598 NEW_JAVAC = $(INTERIM_LANGTOOLS_ARGS) $(JAVAC_MAIN_CLASS) |
595 NEW_JAVAC = $(INTERIM_LANGTOOLS_ARGS) $(JAVAC_MAIN_CLASS) |
599 NEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) $(JAVADOC_MAIN_CLASS) |
596 NEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) $(JAVADOC_MAIN_CLASS) |
600 |
597 |