8149110: Introduce DISABLED_WARNINGS for Java compilation
Reviewed-by: erikj
This commit is contained in:
parent
3aceb74ac9
commit
ed8c11e0d1
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@ -94,6 +94,7 @@ COPY_TO_IMAGE := *.html *.txt *.png *.xml README*
|
|||||||
# EXTRA_MANIFEST_ATTR Extra manifest attribute
|
# EXTRA_MANIFEST_ATTR Extra manifest attribute
|
||||||
# SKIP_COMPILATION Skip Java compilation iff true
|
# SKIP_COMPILATION Skip Java compilation iff true
|
||||||
# DISABLE_SJAVAC Passed to SetupJavaCompilation
|
# DISABLE_SJAVAC Passed to SetupJavaCompilation
|
||||||
|
# DISABLED_WARNINGS Additional disabled warnings
|
||||||
SetupBuildDemo = $(NamedParamsMacroTemplate)
|
SetupBuildDemo = $(NamedParamsMacroTemplate)
|
||||||
define SetupBuildDemoBody
|
define SetupBuildDemoBody
|
||||||
ifeq ($$($1_SRC_DIR), )
|
ifeq ($$($1_SRC_DIR), )
|
||||||
@ -135,6 +136,7 @@ define SetupBuildDemoBody
|
|||||||
EXTRA_MANIFEST_ATTR := $$($1_EXTRA_MANIFEST_ATTR), \
|
EXTRA_MANIFEST_ATTR := $$($1_EXTRA_MANIFEST_ATTR), \
|
||||||
SRCZIP := $(SUPPORT_OUTPUTDIR)/demos/image/$$($1_DEMO_SUBDIR)/$1/src.zip, \
|
SRCZIP := $(SUPPORT_OUTPUTDIR)/demos/image/$$($1_DEMO_SUBDIR)/$1/src.zip, \
|
||||||
EXCLUDE_FILES := $$($1_EXCLUDE_FILES), \
|
EXCLUDE_FILES := $$($1_EXCLUDE_FILES), \
|
||||||
|
DISABLED_WARNINGS := $$($1_DISABLED_WARNINGS), \
|
||||||
DISABLE_SJAVAC := $$($1_DISABLE_SJAVAC), \
|
DISABLE_SJAVAC := $$($1_DISABLE_SJAVAC), \
|
||||||
))
|
))
|
||||||
|
|
||||||
@ -173,35 +175,42 @@ $(BUILD_DEMO_CodePointIM_JAR): $(CODEPOINT_METAINF_SERVICE_FILE)
|
|||||||
|
|
||||||
$(eval $(call SetupBuildDemo, FileChooserDemo, \
|
$(eval $(call SetupBuildDemo, FileChooserDemo, \
|
||||||
DEMO_SUBDIR := jfc, \
|
DEMO_SUBDIR := jfc, \
|
||||||
|
DISABLED_WARNINGS := rawtypes deprecation unchecked, \
|
||||||
))
|
))
|
||||||
|
|
||||||
$(eval $(call SetupBuildDemo, SwingSet2, \
|
$(eval $(call SetupBuildDemo, SwingSet2, \
|
||||||
DEMO_SUBDIR := jfc, \
|
DEMO_SUBDIR := jfc, \
|
||||||
EXTRA_COPY_TO_JAR := .java, \
|
EXTRA_COPY_TO_JAR := .java, \
|
||||||
EXTRA_MANIFEST_ATTR := SplashScreen-Image: resources/images/splash.png, \
|
EXTRA_MANIFEST_ATTR := SplashScreen-Image: resources/images/splash.png, \
|
||||||
|
DISABLED_WARNINGS := rawtypes deprecation unchecked static serial cast, \
|
||||||
DISABLE_SJAVAC := true, \
|
DISABLE_SJAVAC := true, \
|
||||||
))
|
))
|
||||||
|
|
||||||
$(eval $(call SetupBuildDemo, Font2DTest, \
|
$(eval $(call SetupBuildDemo, Font2DTest, \
|
||||||
|
DISABLED_WARNINGS := rawtypes deprecation unchecked serial cast, \
|
||||||
DEMO_SUBDIR := jfc, \
|
DEMO_SUBDIR := jfc, \
|
||||||
))
|
))
|
||||||
|
|
||||||
$(eval $(call SetupBuildDemo, J2Ddemo, \
|
$(eval $(call SetupBuildDemo, J2Ddemo, \
|
||||||
DEMO_SUBDIR := jfc, \
|
DEMO_SUBDIR := jfc, \
|
||||||
MAIN_CLASS := java2d.J2Ddemo, \
|
MAIN_CLASS := java2d.J2Ddemo, \
|
||||||
|
DISABLED_WARNINGS := rawtypes deprecation unchecked cast, \
|
||||||
JAR_NAME := J2Ddemo, \
|
JAR_NAME := J2Ddemo, \
|
||||||
))
|
))
|
||||||
|
|
||||||
$(eval $(call SetupBuildDemo, Metalworks, \
|
$(eval $(call SetupBuildDemo, Metalworks, \
|
||||||
|
DISABLED_WARNINGS := rawtypes unchecked, \
|
||||||
DEMO_SUBDIR := jfc, \
|
DEMO_SUBDIR := jfc, \
|
||||||
))
|
))
|
||||||
|
|
||||||
$(eval $(call SetupBuildDemo, Notepad, \
|
$(eval $(call SetupBuildDemo, Notepad, \
|
||||||
|
DISABLED_WARNINGS := rawtypes, \
|
||||||
DEMO_SUBDIR := jfc, \
|
DEMO_SUBDIR := jfc, \
|
||||||
))
|
))
|
||||||
|
|
||||||
$(eval $(call SetupBuildDemo, Stylepad, \
|
$(eval $(call SetupBuildDemo, Stylepad, \
|
||||||
DEMO_SUBDIR := jfc, \
|
DEMO_SUBDIR := jfc, \
|
||||||
|
DISABLED_WARNINGS := rawtypes unchecked, \
|
||||||
EXTRA_SRC_DIR := $(DEMO_SHARE_SRC)/jfc/Notepad, \
|
EXTRA_SRC_DIR := $(DEMO_SHARE_SRC)/jfc/Notepad, \
|
||||||
EXCLUDE_FILES := $(DEMO_SHARE_SRC)/jfc/Notepad/README.txt, \
|
EXCLUDE_FILES := $(DEMO_SHARE_SRC)/jfc/Notepad/README.txt, \
|
||||||
))
|
))
|
||||||
@ -211,6 +220,7 @@ $(eval $(call SetupBuildDemo, SampleTree, \
|
|||||||
))
|
))
|
||||||
|
|
||||||
$(eval $(call SetupBuildDemo, TableExample, \
|
$(eval $(call SetupBuildDemo, TableExample, \
|
||||||
|
DISABLED_WARNINGS := rawtypes unchecked deprecation, \
|
||||||
DEMO_SUBDIR := jfc, \
|
DEMO_SUBDIR := jfc, \
|
||||||
))
|
))
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@ -77,12 +77,12 @@ define SetupInterimModule
|
|||||||
EXTRA_FILES := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim/module-info.java, \
|
EXTRA_FILES := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim/module-info.java, \
|
||||||
COPY := .gif .png .xml .css .js javax.tools.JavaCompilerTool, \
|
COPY := .gif .png .xml .css .js javax.tools.JavaCompilerTool, \
|
||||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules/$1.interim, \
|
BIN := $(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules/$1.interim, \
|
||||||
|
DISABLED_WARNINGS := module, \
|
||||||
ADD_JAVAC_FLAGS := --module-path $(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules \
|
ADD_JAVAC_FLAGS := --module-path $(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules \
|
||||||
$$(INTERIM_LANGTOOLS_ADD_EXPORTS) \
|
$$(INTERIM_LANGTOOLS_ADD_EXPORTS) \
|
||||||
--patch-module java.base=$(BUILDTOOLS_OUTPUTDIR)/gensrc/java.base.interim \
|
--patch-module java.base=$(BUILDTOOLS_OUTPUTDIR)/gensrc/java.base.interim \
|
||||||
--add-exports java.base/jdk.internal=java.compiler.interim \
|
--add-exports java.base/jdk.internal=java.compiler.interim \
|
||||||
--add-exports java.base/jdk.internal=jdk.compiler.interim \
|
--add-exports java.base/jdk.internal=jdk.compiler.interim, \
|
||||||
-Xlint:-module, \
|
|
||||||
))
|
))
|
||||||
|
|
||||||
$1_DEPS_INTERIM := $$(addsuffix .interim, $$(filter \
|
$1_DEPS_INTERIM := $$(addsuffix .interim, $$(filter \
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@ -67,6 +67,7 @@ $(eval $(call SetupJavaCompilation, BUILD_jdk.rmic.interim, \
|
|||||||
INCLUDES := $(RMIC_PKGS), \
|
INCLUDES := $(RMIC_PKGS), \
|
||||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/interim_rmic_modules/jdk.rmic.interim, \
|
BIN := $(BUILDTOOLS_OUTPUTDIR)/interim_rmic_modules/jdk.rmic.interim, \
|
||||||
COPY := .properties, \
|
COPY := .properties, \
|
||||||
|
DISABLED_WARNINGS := deprecation, \
|
||||||
ADD_JAVAC_FLAGS := \
|
ADD_JAVAC_FLAGS := \
|
||||||
--module-path $(BUILDTOOLS_OUTPUTDIR)/interim_rmic_modules \
|
--module-path $(BUILDTOOLS_OUTPUTDIR)/interim_rmic_modules \
|
||||||
$(INTERIM_RMIC_ADD_EXPORTS), \
|
$(INTERIM_RMIC_ADD_EXPORTS), \
|
||||||
|
@ -80,7 +80,7 @@ java.datatransfer_COPY += flavormap.properties
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
java.desktop_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference \
|
java.desktop_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference \
|
||||||
'-Xdoclint/package:java.*,javax.*' -Xlint:exports \
|
'-Xdoclint/package:java.*,javax.*' \
|
||||||
--doclint-format html4
|
--doclint-format html4
|
||||||
java.desktop_COPY += .gif .png .wav .txt .xml .css .pf
|
java.desktop_COPY += .gif .png .wav .txt .xml .css .pf
|
||||||
java.desktop_CLEAN += iio-plugin.properties cursors.properties
|
java.desktop_CLEAN += iio-plugin.properties cursors.properties
|
||||||
@ -245,7 +245,6 @@ java.transaction.xa_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/packag
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
java.sql_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
|
java.sql_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
|
||||||
java.sql_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
@ -270,7 +269,7 @@ java.xml_CLEAN += .properties
|
|||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
java.naming_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-accessibility '-Xdoclint/package:java.*,javax.*' -Xlint:-exports
|
java.naming_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-accessibility '-Xdoclint/package:java.*,javax.*'
|
||||||
java.naming_CLEAN += jndiprovider.properties
|
java.naming_CLEAN += jndiprovider.properties
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
@ -304,7 +303,8 @@ jdk.compiler_CLEAN_FILES += $(wildcard \
|
|||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
jdk.hotspot.agent_ADD_JAVAC_FLAGS += $(DISABLE_WARNINGS),-overrides
|
jdk.hotspot.agent_DISABLED_WARNINGS += deprecation rawtypes serial unchecked \
|
||||||
|
cast static overrides fallthrough
|
||||||
jdk.hotspot.agent_COPY += .gif .png sa.js .properties
|
jdk.hotspot.agent_COPY += .gif .png sa.js .properties
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
@ -341,17 +341,17 @@ jdk.jartool_ADD_JAVAC_FLAGS += -XDstringConcat=inline
|
|||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
jdk.scripting.nashorn_ADD_JAVAC_FLAGS += $(DISABLE_WARNINGS),-overrides
|
jdk.scripting.nashorn_DISABLED_WARNINGS += removal
|
||||||
jdk.scripting.nashorn_COPY := .properties .js
|
jdk.scripting.nashorn_COPY := .properties .js
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
jdk.scripting.nashorn.shell_ADD_JAVAC_FLAGS += $(DISABLE_WARNINGS),-overrides
|
jdk.scripting.nashorn.shell_DISABLED_WARNINGS += removal
|
||||||
jdk.scripting.nashorn.shell_COPY += .js .properties
|
jdk.scripting.nashorn.shell_COPY += .js .properties
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
jdk.rmic_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
|
jdk.rmic_DISABLED_WARNINGS += deprecation
|
||||||
jdk.rmic_CLEAN += .properties
|
jdk.rmic_CLEAN += .properties
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
@ -431,7 +431,7 @@ jdk.internal.jvmstat_COPY += aliasmap
|
|||||||
# The exports are needed since JVMCI is dynamically exported (see
|
# The exports are needed since JVMCI is dynamically exported (see
|
||||||
# jdk.vm.ci.services.internal.ReflectionAccessJDK::openJVMCITo).
|
# jdk.vm.ci.services.internal.ReflectionAccessJDK::openJVMCITo).
|
||||||
|
|
||||||
jdk.internal.vm.ci_ADD_JAVAC_FLAGS += -parameters -Xlint:-exports -XDstringConcat=inline
|
jdk.internal.vm.ci_ADD_JAVAC_FLAGS += -parameters -XDstringConcat=inline
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
@ -536,13 +536,9 @@ jdk.localedata_EXCLUDE_FILES += sun/text/resources/ext/BreakIteratorRules_th.jav
|
|||||||
jdk.localedata_KEEP_ALL_TRANSLATIONS := true
|
jdk.localedata_KEEP_ALL_TRANSLATIONS := true
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
# There is an issue in sjavac that triggers a warning in jdk.jfr that isn't
|
jdk.jfr_DISABLED_WARNINGS += exports
|
||||||
# triggered without sjavac.
|
|
||||||
ifeq ($(ENABLE_SJAVAC), yes)
|
|
||||||
jdk.jfr_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
|
|
||||||
endif
|
|
||||||
jdk.jfr_COPY := .xsd .xml .dtd
|
jdk.jfr_COPY := .xsd .xml .dtd
|
||||||
jdk.jfr_ADD_JAVAC_FLAGS := -XDstringConcat=inline -Xlint:-exports
|
jdk.jfr_ADD_JAVAC_FLAGS := -XDstringConcat=inline
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# If this is an imported module that has prebuilt classes, only compile
|
# If this is an imported module that has prebuilt classes, only compile
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@ -42,6 +42,7 @@ $(eval $(call SetupJavaCompilation,BUILD_JIGSAW_TOOLS, \
|
|||||||
build/tools/jigsaw, \
|
build/tools/jigsaw, \
|
||||||
COPY := .properties .html, \
|
COPY := .properties .html, \
|
||||||
BIN := $(TOOLS_CLASSES_DIR), \
|
BIN := $(TOOLS_CLASSES_DIR), \
|
||||||
|
DISABLED_WARNINGS := fallthrough, \
|
||||||
ADD_JAVAC_FLAGS := \
|
ADD_JAVAC_FLAGS := \
|
||||||
--add-modules jdk.jdeps \
|
--add-modules jdk.jdeps \
|
||||||
--add-exports java.base/jdk.internal.module=ALL-UNNAMED \
|
--add-exports java.base/jdk.internal.module=ALL-UNNAMED \
|
||||||
|
@ -53,6 +53,7 @@ $(eval $(call SetupJavaCompilation,BUILD_TOOLS_JDK, \
|
|||||||
build/tools/jigsaw \
|
build/tools/jigsaw \
|
||||||
build/tools/depend \
|
build/tools/depend \
|
||||||
, \
|
, \
|
||||||
|
DISABLED_WARNINGS := unchecked rawtypes deprecation cast, \
|
||||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes, \
|
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes, \
|
||||||
ADD_JAVAC_FLAGS := \
|
ADD_JAVAC_FLAGS := \
|
||||||
--add-exports java.desktop/sun.awt=ALL-UNNAMED \
|
--add-exports java.desktop/sun.awt=ALL-UNNAMED \
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@ -154,6 +154,7 @@ endef
|
|||||||
# SETUP:=must point to a previously setup java compiler, for example: SETUP:=BOOTJAVAC
|
# SETUP:=must point to a previously setup java compiler, for example: SETUP:=BOOTJAVAC
|
||||||
# JVM:=path to ..bin/java
|
# JVM:=path to ..bin/java
|
||||||
# ADD_JAVAC_FLAGS:=javac flags to append to the default ones.
|
# ADD_JAVAC_FLAGS:=javac flags to append to the default ones.
|
||||||
|
# DISABLED_WARNINGS:=list of Xlint warnings that should be disabled
|
||||||
# SRC:=one or more directories to search for sources. The order of the source roots
|
# SRC:=one or more directories to search for sources. The order of the source roots
|
||||||
# is significant. The first found file of a certain name has priority.
|
# is significant. The first found file of a certain name has priority.
|
||||||
# BIN:=store classes here
|
# BIN:=store classes here
|
||||||
@ -198,9 +199,15 @@ define SetupJavaCompilationBody
|
|||||||
$1_FLAGS := -g
|
$1_FLAGS := -g
|
||||||
endif
|
endif
|
||||||
$1_FLAGS += $$($$($1_SETUP)_FLAGS) $$($1_ADD_JAVAC_FLAGS) $(JAVAC_FLAGS)
|
$1_FLAGS += $$($$($1_SETUP)_FLAGS) $$($1_ADD_JAVAC_FLAGS) $(JAVAC_FLAGS)
|
||||||
|
|
||||||
|
ifneq ($$($1_DISABLED_WARNINGS), )
|
||||||
|
$1_FLAGS += -Xlint:$$(call CommaList, $$(addprefix -, $$($1_DISABLED_WARNINGS)))
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($$($1_CLASSPATH), )
|
ifneq ($$($1_CLASSPATH), )
|
||||||
$1_FLAGS += -cp $$(call PathList, $$($1_CLASSPATH))
|
$1_FLAGS += -cp $$(call PathList, $$($1_CLASSPATH))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($$($1_JAVAC),)
|
ifeq ($$($1_JAVAC),)
|
||||||
$$(error The Java compilation $1 refers to a non-existant java compiler setup $$($1_SETUP))
|
$$(error The Java compilation $1 refers to a non-existant java compiler setup $$($1_SETUP))
|
||||||
endif
|
endif
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@ -31,8 +31,6 @@ $(eval $(call IncludeCustomExtension, common/SetupJavaCompilers.gmk))
|
|||||||
|
|
||||||
include JavaCompilation.gmk
|
include JavaCompilation.gmk
|
||||||
|
|
||||||
DISABLE_WARNINGS ?= -Xlint:all,-deprecation,-removal,-unchecked,-rawtypes,-cast,-serial,-dep-ann,-static,-fallthrough,-try,-varargs,-empty,-finally
|
|
||||||
|
|
||||||
JDK_SOURCE_TARGET_FLAGS := -source $(JDK_SOURCE_TARGET_VERSION) \
|
JDK_SOURCE_TARGET_FLAGS := -source $(JDK_SOURCE_TARGET_VERSION) \
|
||||||
-target $(JDK_SOURCE_TARGET_VERSION)
|
-target $(JDK_SOURCE_TARGET_VERSION)
|
||||||
|
|
||||||
@ -48,7 +46,7 @@ $(eval $(call SetupJavaCompiler,BOOT_JAVAC, \
|
|||||||
$(JAVA_TOOL_FLAGS_SMALL) \
|
$(JAVA_TOOL_FLAGS_SMALL) \
|
||||||
$(BOOT_JDK_SOURCETARGET) \
|
$(BOOT_JDK_SOURCETARGET) \
|
||||||
-XDignore.symbol.file=true -g \
|
-XDignore.symbol.file=true -g \
|
||||||
-Xlint:all$(COMMA)-deprecation$(COMMA)-options -Werror, \
|
$(JAVAC_WARNINGS) -Xlint:-options, \
|
||||||
DISABLE_SJAVAC := true, \
|
DISABLE_SJAVAC := true, \
|
||||||
))
|
))
|
||||||
|
|
||||||
@ -66,7 +64,7 @@ $(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE, \
|
|||||||
JVM := $(JAVA_SMALL), \
|
JVM := $(JAVA_SMALL), \
|
||||||
JAVAC := $(NEW_JAVAC), \
|
JAVAC := $(NEW_JAVAC), \
|
||||||
FLAGS := $(BOOT_JDK_SOURCETARGET) -XDignore.symbol.file=true -XDstringConcat=inline \
|
FLAGS := $(BOOT_JDK_SOURCETARGET) -XDignore.symbol.file=true -XDstringConcat=inline \
|
||||||
$(DISABLE_WARNINGS) -Xlint:-options, \
|
$(JAVAC_WARNINGS) -Xlint:-options, \
|
||||||
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
||||||
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
|
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
|
||||||
|
|
||||||
@ -80,16 +78,6 @@ $(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE, \
|
|||||||
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
||||||
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
|
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
|
||||||
|
|
||||||
# The generate new bytecode javac setup uses the new compiler to compile for the
|
|
||||||
# new jdk. This new bytecode might only be possible to run using the new jvm.
|
|
||||||
$(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE_NOWARNINGS, \
|
|
||||||
JVM := $(JAVA_JAVAC), \
|
|
||||||
JAVAC := $(NEW_JAVAC), \
|
|
||||||
FLAGS := $(JDK_SOURCE_TARGET_FLAGS) \
|
|
||||||
-encoding ascii -XDignore.symbol.file=true $(DISABLE_WARNINGS), \
|
|
||||||
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
|
||||||
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
|
|
||||||
|
|
||||||
# After the jdk is built, we want to build demos using only the recently
|
# After the jdk is built, we want to build demos using only the recently
|
||||||
# generated jdk classes and nothing else, no jdk source, etc etc.
|
# generated jdk classes and nothing else, no jdk source, etc etc.
|
||||||
# I.e. the rt.jar, but since rt.jar has not yet been generated
|
# I.e. the rt.jar, but since rt.jar has not yet been generated
|
||||||
@ -97,7 +85,8 @@ $(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE_NOWARNINGS, \
|
|||||||
$(eval $(call SetupJavaCompiler,GENERATE_USINGJDKBYTECODE, \
|
$(eval $(call SetupJavaCompiler,GENERATE_USINGJDKBYTECODE, \
|
||||||
JVM := $(JAVA_SMALL), \
|
JVM := $(JAVA_SMALL), \
|
||||||
JAVAC := $(NEW_JAVAC), \
|
JAVAC := $(NEW_JAVAC), \
|
||||||
FLAGS := --upgrade-module-path $(JDK_OUTPUTDIR)/modules --system none $(DISABLE_WARNINGS), \
|
FLAGS := --upgrade-module-path $(JDK_OUTPUTDIR)/modules --system none \
|
||||||
|
$(JAVAC_WARNINGS), \
|
||||||
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
||||||
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
|
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
|
||||||
|
|
||||||
@ -108,7 +97,7 @@ $(eval $(call SetupJavaCompiler,GENERATE_8_BYTECODE, \
|
|||||||
$(JAVA_TOOL_FLAGS_SMALL) \
|
$(JAVA_TOOL_FLAGS_SMALL) \
|
||||||
--release 8 \
|
--release 8 \
|
||||||
-XDignore.symbol.file=true -g \
|
-XDignore.symbol.file=true -g \
|
||||||
-Xlint:all -Werror, \
|
$(JAVAC_WARNINGS), \
|
||||||
DISABLE_SJAVAC := true, \
|
DISABLE_SJAVAC := true, \
|
||||||
))
|
))
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@ -31,7 +31,7 @@ JFR_TOOLS_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/buildtools/tools_classes
|
|||||||
|
|
||||||
$(eval $(call SetupJavaCompiler, GENERATE_JFRBYTECODE, \
|
$(eval $(call SetupJavaCompiler, GENERATE_JFRBYTECODE, \
|
||||||
JAVAC := $(JAVAC), \
|
JAVAC := $(JAVAC), \
|
||||||
FLAGS := $(DISABLE_WARNINGS), \
|
FLAGS := -Xlint:all -Werror, \
|
||||||
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
||||||
SERVER_JVM := $(SJAVAC_SERVER_JAVA), \
|
SERVER_JVM := $(SJAVAC_SERVER_JAVA), \
|
||||||
DISABLE_SJAVAC := true, \
|
DISABLE_SJAVAC := true, \
|
||||||
@ -41,6 +41,7 @@ $(eval $(call SetupJavaCompilation, BUILD_JFR_TOOLS, \
|
|||||||
SETUP := GENERATE_JFRBYTECODE, \
|
SETUP := GENERATE_JFRBYTECODE, \
|
||||||
SRC := $(JFR_TOOLS_SRCDIR), \
|
SRC := $(JFR_TOOLS_SRCDIR), \
|
||||||
BIN := $(JFR_TOOLS_OUTPUTDIR), \
|
BIN := $(JFR_TOOLS_OUTPUTDIR), \
|
||||||
|
DISABLED_WARNINGS := try, \
|
||||||
))
|
))
|
||||||
|
|
||||||
TARGETS += $(BUILD_JFR_TOOLS)
|
TARGETS += $(BUILD_JFR_TOOLS)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@ -34,7 +34,7 @@ JVMTI_TOOLS_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/tools/jvmti
|
|||||||
|
|
||||||
$(eval $(call SetupJavaCompiler, GENERATE_OLDBYTECODE, \
|
$(eval $(call SetupJavaCompiler, GENERATE_OLDBYTECODE, \
|
||||||
JAVAC := $(JAVAC), \
|
JAVAC := $(JAVAC), \
|
||||||
FLAGS := $(DISABLE_WARNINGS), \
|
FLAGS := -Xlint:all -Werror, \
|
||||||
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
||||||
SERVER_JVM := $(SJAVAC_SERVER_JAVA), \
|
SERVER_JVM := $(SJAVAC_SERVER_JAVA), \
|
||||||
DISABLE_SJAVAC := true, \
|
DISABLE_SJAVAC := true, \
|
||||||
@ -43,6 +43,7 @@ $(eval $(call SetupJavaCompiler, GENERATE_OLDBYTECODE, \
|
|||||||
$(eval $(call SetupJavaCompilation, BUILD_JVMTI_TOOLS, \
|
$(eval $(call SetupJavaCompilation, BUILD_JVMTI_TOOLS, \
|
||||||
SETUP := GENERATE_OLDBYTECODE, \
|
SETUP := GENERATE_OLDBYTECODE, \
|
||||||
SRC := $(JVMTI_TOOLS_SRCDIR), \
|
SRC := $(JVMTI_TOOLS_SRCDIR), \
|
||||||
|
DISABLED_WARNINGS := rawtypes cast, \
|
||||||
INCLUDE_FILES := jvmtiGen.java jvmtiEnvFill.java, \
|
INCLUDE_FILES := jvmtiGen.java jvmtiEnvFill.java, \
|
||||||
BIN := $(JVMTI_TOOLS_OUTPUTDIR), \
|
BIN := $(JVMTI_TOOLS_OUTPUTDIR), \
|
||||||
))
|
))
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@ -98,7 +98,7 @@ ifeq ($(call isTargetOs, windows), true)
|
|||||||
|
|
||||||
$(eval $(call SetupJavaCompilation, BUILD_PROJECT_CREATOR, \
|
$(eval $(call SetupJavaCompilation, BUILD_PROJECT_CREATOR, \
|
||||||
SETUP := GENERATE_OLDBYTECODE, \
|
SETUP := GENERATE_OLDBYTECODE, \
|
||||||
ADD_JAVAC_FLAGS := -Xlint:-auxiliaryclass, \
|
DISABLED_WARNINGS := auxiliaryclass deprecation rawtypes unchecked cast, \
|
||||||
SRC := $(TOPDIR)/make/hotspot/src/classes, \
|
SRC := $(TOPDIR)/make/hotspot/src/classes, \
|
||||||
BIN := $(TOOLS_OUTPUTDIR), \
|
BIN := $(TOOLS_OUTPUTDIR), \
|
||||||
))
|
))
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@ -52,6 +52,7 @@ $(eval $(call SetupJavaCompilation, BUILD_FAILURE_HANDLER, \
|
|||||||
SETUP := GENERATE_OLDBYTECODE, \
|
SETUP := GENERATE_OLDBYTECODE, \
|
||||||
SRC := $(FH_BASEDIR)/src/share/classes $(FH_BASEDIR)/src/share/conf, \
|
SRC := $(FH_BASEDIR)/src/share/classes $(FH_BASEDIR)/src/share/conf, \
|
||||||
BIN := $(FH_SUPPORT)/classes, \
|
BIN := $(FH_SUPPORT)/classes, \
|
||||||
|
DISABLED_WARNINGS := deprecation serial try, \
|
||||||
COPY := .properties, \
|
COPY := .properties, \
|
||||||
CLASSPATH := $(JTREG_JAR) $(TOOLS_JAR), \
|
CLASSPATH := $(JTREG_JAR) $(TOOLS_JAR), \
|
||||||
JAR := $(FH_JAR), \
|
JAR := $(FH_JAR), \
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@ -77,6 +77,7 @@ $(eval $(call SetupJavaCompilation, BUILD_INDIFY, \
|
|||||||
SETUP := GENERATE_OLDBYTECODE, \
|
SETUP := GENERATE_OLDBYTECODE, \
|
||||||
SRC := $(TOPDIR)/test/jdk/java/lang/invoke, \
|
SRC := $(TOPDIR)/test/jdk/java/lang/invoke, \
|
||||||
INCLUDE_FILES := indify/Indify.java, \
|
INCLUDE_FILES := indify/Indify.java, \
|
||||||
|
DISABLED_WARNINGS := rawtypes unchecked serial deprecation, \
|
||||||
BIN := $(MICROBENCHMARK_TOOLS_CLASSES), \
|
BIN := $(MICROBENCHMARK_TOOLS_CLASSES), \
|
||||||
))
|
))
|
||||||
|
|
||||||
@ -88,7 +89,8 @@ $(eval $(call SetupJavaCompiler, MICROBENCHMARK_JAVA_COMPILER, \
|
|||||||
JVM := $(JAVA) --add-modules jdk.unsupported --limit-modules java.management, \
|
JVM := $(JAVA) --add-modules jdk.unsupported --limit-modules java.management, \
|
||||||
JAVAC := $(NEW_JAVAC), \
|
JAVAC := $(NEW_JAVAC), \
|
||||||
DISABLE_SJAVAC := true, \
|
DISABLE_SJAVAC := true, \
|
||||||
FLAGS := --upgrade-module-path $(JDK_OUTPUTDIR)/modules --system none $(DISABLE_WARNINGS), \
|
FLAGS := --upgrade-module-path $(JDK_OUTPUTDIR)/modules --system none \
|
||||||
|
-Xlint:all -Werror, \
|
||||||
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
||||||
SERVER_JVM := $(SJAVAC_SERVER_JAVA), \
|
SERVER_JVM := $(SJAVAC_SERVER_JAVA), \
|
||||||
))
|
))
|
||||||
@ -96,7 +98,8 @@ $(eval $(call SetupJavaCompiler, MICROBENCHMARK_JAVA_COMPILER, \
|
|||||||
# Build microbenchmark suite for the current JDK
|
# Build microbenchmark suite for the current JDK
|
||||||
$(eval $(call SetupJavaCompilation, BUILD_JDK_MICROBENCHMARK, \
|
$(eval $(call SetupJavaCompilation, BUILD_JDK_MICROBENCHMARK, \
|
||||||
SETUP := MICROBENCHMARK_JAVA_COMPILER, \
|
SETUP := MICROBENCHMARK_JAVA_COMPILER, \
|
||||||
ADD_JAVAC_FLAGS := -cp $(MICROBENCHMARK_CLASSPATH) -Xlint -Xlint:-processing -Werror, \
|
ADD_JAVAC_FLAGS := -cp $(MICROBENCHMARK_CLASSPATH), \
|
||||||
|
DISABLED_WARNINGS := processing rawtypes cast serial deprecation, \
|
||||||
SRC := $(MICROBENCHMARK_SRC), \
|
SRC := $(MICROBENCHMARK_SRC), \
|
||||||
BIN := $(MICROBENCHMARK_CLASSES), \
|
BIN := $(MICROBENCHMARK_CLASSES), \
|
||||||
))
|
))
|
||||||
|
@ -61,7 +61,6 @@ ifeq ($(INCLUDE_GRAAL), true)
|
|||||||
$(LIB_OUTPUTDIR)/hamcrest-core-1.3.jar
|
$(LIB_OUTPUTDIR)/hamcrest-core-1.3.jar
|
||||||
|
|
||||||
TEST_JAVAC_FLAGS := \
|
TEST_JAVAC_FLAGS := \
|
||||||
-Xlint:none \
|
|
||||||
-processorpath $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.replacements.verifier.jar \
|
-processorpath $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.replacements.verifier.jar \
|
||||||
--add-exports jdk.unsupported/sun.misc=ALL-UNNAMED \
|
--add-exports jdk.unsupported/sun.misc=ALL-UNNAMED \
|
||||||
--add-exports java.base/jdk.internal.misc=ALL-UNNAMED \
|
--add-exports java.base/jdk.internal.misc=ALL-UNNAMED \
|
||||||
@ -114,6 +113,7 @@ ifeq ($(INCLUDE_GRAAL), true)
|
|||||||
EXCLUDE_FILES := org/graalvm/compiler/core/test/VerifyDebugUsageTest.java, \
|
EXCLUDE_FILES := org/graalvm/compiler/core/test/VerifyDebugUsageTest.java, \
|
||||||
BIN := $(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests, \
|
BIN := $(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests, \
|
||||||
CLASSPATH := $(TEST_COMPILE_CP), \
|
CLASSPATH := $(TEST_COMPILE_CP), \
|
||||||
|
DISABLED_WARNINGS := processing, \
|
||||||
ADD_JAVAC_FLAGS := $(TEST_JAVAC_FLAGS), \
|
ADD_JAVAC_FLAGS := $(TEST_JAVAC_FLAGS), \
|
||||||
COPY := .input, \
|
COPY := .input, \
|
||||||
))
|
))
|
||||||
@ -131,6 +131,7 @@ ifeq ($(INCLUDE_GRAAL), true)
|
|||||||
$(TEST_COMPILE_CP) \
|
$(TEST_COMPILE_CP) \
|
||||||
$(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests \
|
$(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests \
|
||||||
, \
|
, \
|
||||||
|
DISABLED_WARNINGS := processing, \
|
||||||
ADD_JAVAC_FLAGS := \
|
ADD_JAVAC_FLAGS := \
|
||||||
$(TEST_JAVAC_FLAGS) \
|
$(TEST_JAVAC_FLAGS) \
|
||||||
-XDstringConcat=inline \
|
-XDstringConcat=inline \
|
||||||
@ -155,6 +156,7 @@ ifeq ($(INCLUDE_GRAAL), true)
|
|||||||
SRC := $(TEST_DIR)/com.oracle.mxtool.junit, \
|
SRC := $(TEST_DIR)/com.oracle.mxtool.junit, \
|
||||||
BIN := $(COMPILE_OUTPUTDIR)/com.oracle.mxtool.junit, \
|
BIN := $(COMPILE_OUTPUTDIR)/com.oracle.mxtool.junit, \
|
||||||
JAR := $(COMPILE_OUTPUTDIR)/com.oracle.mxtool.junit.jar, \
|
JAR := $(COMPILE_OUTPUTDIR)/com.oracle.mxtool.junit.jar, \
|
||||||
|
DISABLED_WARNINGS := processing, \
|
||||||
CLASSPATH := $(LIB_OUTPUTDIR)/junit-4.12.jar, \
|
CLASSPATH := $(LIB_OUTPUTDIR)/junit-4.12.jar, \
|
||||||
))
|
))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user