make/common/SetupJavaCompilers.gmk
changeset 27560 adc258b13e2c
parent 26548 3b002da2aee1
child 27602 236555ddac42
equal deleted inserted replaced
27559:23d1529db8c7 27560:adc258b13e2c
    46 # requires restricting to language level and api of previous JDK.
    46 # requires restricting to language level and api of previous JDK.
    47 #
    47 #
    48 # The generate old bytecode javac setup uses the new compiler to compile for the
    48 # The generate old bytecode javac setup uses the new compiler to compile for the
    49 # boot jdk to generate tools that need to be run with the boot jdk.
    49 # boot jdk to generate tools that need to be run with the boot jdk.
    50 # Thus we force the target bytecode to the previous JDK version.
    50 # Thus we force the target bytecode to the previous JDK version.
       
    51 # Add -Xlint:-options to avoid the warning about not setting -bootclasspath. Since
       
    52 # it's running on the boot jdk, the default bootclasspath is correct.
    51 $(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE, \
    53 $(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE, \
    52     JVM := $(JAVA_SMALL), \
    54     JVM := $(JAVA_SMALL), \
    53     JAVAC := $(NEW_JAVAC), \
    55     JAVAC := $(NEW_JAVAC), \
    54     FLAGS := $(BOOT_JDK_SOURCETARGET) -bootclasspath $(BOOT_RTJAR) $(DISABLE_WARNINGS), \
    56     FLAGS := $(BOOT_JDK_SOURCETARGET) -XDignore.symbol.file=true \
       
    57         $(DISABLE_WARNINGS) -Xlint:-options, \
    55     SERVER_DIR := $(SJAVAC_SERVER_DIR), \
    58     SERVER_DIR := $(SJAVAC_SERVER_DIR), \
    56     SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
    59     SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
    57 
    60 
    58 # The generate new bytecode javac setup uses the new compiler to compile for the
    61 # The generate new bytecode javac setup uses the new compiler to compile for the
    59 # new jdk. This new bytecode might only be possible to run using the new jvm.
    62 # new jdk. This new bytecode might only be possible to run using the new jvm.
    60 $(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE, \
    63 $(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE, \
    61     JVM := $(JAVA), \
    64     JVM := $(JAVA), \
    62     JAVAC := $(NEW_JAVAC), \
    65     JAVAC := $(NEW_JAVAC), \
    63     FLAGS := -source 9 -target 9 \
    66     FLAGS := -source 9 -target 9 \
    64         -encoding ascii -XDignore.symbol.file=true $(JAVAC_WARNINGS) \
    67         -encoding ascii -XDignore.symbol.file=true $(JAVAC_WARNINGS), \
    65         $(GENERATE_JDKBYTECODE_EXTRA_FLAGS), \
       
    66     SERVER_DIR := $(SJAVAC_SERVER_DIR), \
    68     SERVER_DIR := $(SJAVAC_SERVER_DIR), \
    67     SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
    69     SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
    68 
    70 
    69 # The generate new bytecode javac setup uses the new compiler to compile for the
    71 # The generate new bytecode javac setup uses the new compiler to compile for the
    70 # new jdk. This new bytecode might only be possible to run using the new jvm.
    72 # new jdk. This new bytecode might only be possible to run using the new jvm.
    71 $(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE_NOWARNINGS, \
    73 $(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE_NOWARNINGS, \
    72     JVM := $(JAVA), \
    74     JVM := $(JAVA), \
    73     JAVAC := $(NEW_JAVAC), \
    75     JAVAC := $(NEW_JAVAC), \
    74     FLAGS := -source 9 -target 9 \
    76     FLAGS := -source 9 -target 9 \
    75         -encoding ascii -XDignore.symbol.file=true $(DISABLE_WARNINGS) \
    77         -encoding ascii -XDignore.symbol.file=true $(DISABLE_WARNINGS), \
    76         $(GENERATE_JDKBYTECODE_EXTRA_FLAGS), \
       
    77     SERVER_DIR := $(SJAVAC_SERVER_DIR), \
    78     SERVER_DIR := $(SJAVAC_SERVER_DIR), \
    78     SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
    79     SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
    79 
    80 
    80 JDK_BOOTCLASSPATH := $(subst $(SPACE),$(PATH_SEP),\
    81 JDK_BOOTCLASSPATH := $(subst $(SPACE),$(PATH_SEP),\
    81     $(filter-out $(JDK_OUTPUTDIR)/modules/_%, $(wildcard $(JDK_OUTPUTDIR)/modules/*)))
    82     $(filter-out $(JDK_OUTPUTDIR)/modules/_%, $(wildcard $(JDK_OUTPUTDIR)/modules/*)))