6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk javac
Summary: The bootstrap javac currently uses the default source and targets of the boot javac
Reviewed-by: ohair
--- a/jdk/make/common/shared/Defs-java.gmk Wed Jul 05 16:58:21 2017 +0200
+++ b/jdk/make/common/shared/Defs-java.gmk Tue Aug 18 19:50:12 2009 +0100
@@ -201,7 +201,10 @@
ifeq ($(JAVAC_WARNINGS_FATAL), true)
BOOT_JAVACFLAGS += -Werror
endif
-BOOT_JAVACFLAGS += -encoding ascii
+
+BOOT_SOURCE_LANGUAGE_VERSION = 6
+BOOT_TARGET_CLASS_VERSION = 6
+BOOT_JAVACFLAGS += -encoding ascii -source $(BOOT_SOURCE_LANGUAGE_VERSION) -target $(BOOT_TARGET_CLASS_VERSION)
BOOT_JAR_JFLAGS += $(JAR_JFLAGS)
BOOT_JAVACFLAGS += $(NO_PROPRIETARY_API_WARNINGS)