8244036: Refresh SetupJavaCompilation, and remove support for sjavac
Reviewed-by: erikj
This commit is contained in:
parent
0783dd69a5
commit
408bc486e0
@ -33,7 +33,6 @@ include $(SPEC)
|
|||||||
include MakeBase.gmk
|
include MakeBase.gmk
|
||||||
include JavaCompilation.gmk
|
include JavaCompilation.gmk
|
||||||
include NativeCompilation.gmk
|
include NativeCompilation.gmk
|
||||||
include SetupJavaCompilers.gmk
|
|
||||||
include TextFileProcessing.gmk
|
include TextFileProcessing.gmk
|
||||||
include ZipArchive.gmk
|
include ZipArchive.gmk
|
||||||
|
|
||||||
@ -93,7 +92,6 @@ COPY_TO_IMAGE := *.html *.txt *.png *.xml README*
|
|||||||
# EXTRA_COPY_TO_IMAGE Additional files to copy to images (as wildcards)
|
# EXTRA_COPY_TO_IMAGE Additional files to copy to images (as wildcards)
|
||||||
# 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
|
|
||||||
# DISABLED_WARNINGS Additional disabled warnings
|
# DISABLED_WARNINGS Additional disabled warnings
|
||||||
SetupBuildDemo = $(NamedParamsMacroTemplate)
|
SetupBuildDemo = $(NamedParamsMacroTemplate)
|
||||||
define SetupBuildDemoBody
|
define SetupBuildDemoBody
|
||||||
@ -126,7 +124,7 @@ define SetupBuildDemoBody
|
|||||||
|
|
||||||
ifneq ($$($1_SKIP_COMPILATION), true)
|
ifneq ($$($1_SKIP_COMPILATION), true)
|
||||||
$$(eval $$(call SetupJavaCompilation, BUILD_DEMO_$1, \
|
$$(eval $$(call SetupJavaCompilation, BUILD_DEMO_$1, \
|
||||||
SETUP := GENERATE_USINGJDKBYTECODE, \
|
TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK_UPGRADED), \
|
||||||
SRC := $$($1_MAIN_SRC) $$($1_EXTRA_SRC_DIR), \
|
SRC := $$($1_MAIN_SRC) $$($1_EXTRA_SRC_DIR), \
|
||||||
BIN := $(SUPPORT_OUTPUTDIR)/demos/classes/$$($1_DEMO_SUBDIR)/$1, \
|
BIN := $(SUPPORT_OUTPUTDIR)/demos/classes/$$($1_DEMO_SUBDIR)/$1, \
|
||||||
COPY := $(COPY_TO_JAR) $$($1_EXTRA_COPY_TO_JAR), \
|
COPY := $(COPY_TO_JAR) $$($1_EXTRA_COPY_TO_JAR), \
|
||||||
@ -137,7 +135,6 @@ define SetupBuildDemoBody
|
|||||||
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), \
|
DISABLED_WARNINGS := $$($1_DISABLED_WARNINGS), \
|
||||||
DISABLE_SJAVAC := $$($1_DISABLE_SJAVAC), \
|
|
||||||
))
|
))
|
||||||
|
|
||||||
$1 += $$(BUILD_DEMO_$1)
|
$1 += $$(BUILD_DEMO_$1)
|
||||||
@ -183,7 +180,6 @@ $(eval $(call SetupBuildDemo, SwingSet2, \
|
|||||||
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, \
|
DISABLED_WARNINGS := rawtypes deprecation unchecked static serial cast, \
|
||||||
DISABLE_SJAVAC := true, \
|
|
||||||
))
|
))
|
||||||
|
|
||||||
$(eval $(call SetupBuildDemo, Font2DTest, \
|
$(eval $(call SetupBuildDemo, Font2DTest, \
|
||||||
|
@ -29,7 +29,6 @@ default: all
|
|||||||
include $(SPEC)
|
include $(SPEC)
|
||||||
include MakeBase.gmk
|
include MakeBase.gmk
|
||||||
include JavaCompilation.gmk
|
include JavaCompilation.gmk
|
||||||
include SetupJavaCompilers.gmk
|
|
||||||
include Modules.gmk
|
include Modules.gmk
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
@ -66,8 +65,8 @@ TARGETS += $(COPY_PREVIEW_FEATURES)
|
|||||||
# Param 1 - Name of module to compile
|
# Param 1 - Name of module to compile
|
||||||
define SetupInterimModule
|
define SetupInterimModule
|
||||||
$$(eval $$(call SetupJavaCompilation, BUILD_$1.interim, \
|
$$(eval $$(call SetupJavaCompilation, BUILD_$1.interim, \
|
||||||
SETUP := BOOT_JAVAC, \
|
COMPILER := bootjdk, \
|
||||||
DISABLE_SJAVAC := true, \
|
TARGET_RELEASE := $$(TARGET_RELEASE_BOOTJDK), \
|
||||||
SRC := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim \
|
SRC := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim \
|
||||||
$$(wildcard $(SUPPORT_OUTPUTDIR)/gensrc/$1) \
|
$$(wildcard $(SUPPORT_OUTPUTDIR)/gensrc/$1) \
|
||||||
$(TOPDIR)/src/$1/share/classes, \
|
$(TOPDIR)/src/$1/share/classes, \
|
||||||
@ -77,8 +76,9 @@ 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, \
|
DISABLED_WARNINGS := module options, \
|
||||||
ADD_JAVAC_FLAGS := --module-path $(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules \
|
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 \
|
||||||
|
@ -30,7 +30,6 @@ include $(SPEC)
|
|||||||
include MakeBase.gmk
|
include MakeBase.gmk
|
||||||
include Modules.gmk
|
include Modules.gmk
|
||||||
include JavaCompilation.gmk
|
include JavaCompilation.gmk
|
||||||
include SetupJavaCompilers.gmk
|
|
||||||
|
|
||||||
# Hook to include the corresponding custom file, if present.
|
# Hook to include the corresponding custom file, if present.
|
||||||
$(eval $(call IncludeCustomExtension, CompileJavaModules.gmk))
|
$(eval $(call IncludeCustomExtension, CompileJavaModules.gmk))
|
||||||
@ -40,7 +39,7 @@ $(eval $(call IncludeCustomExtension, CompileJavaModules.gmk))
|
|||||||
|
|
||||||
java.base_DOCLINT += -Xdoclint:all/protected,-reference,-accessibility \
|
java.base_DOCLINT += -Xdoclint:all/protected,-reference,-accessibility \
|
||||||
'-Xdoclint/package:java.*,javax.*'
|
'-Xdoclint/package:java.*,javax.*'
|
||||||
java.base_ADD_JAVAC_FLAGS += -XDstringConcat=inline
|
java.base_JAVAC_FLAGS += -XDstringConcat=inline
|
||||||
java.base_COPY += .icu .dat .spp .nrm content-types.properties \
|
java.base_COPY += .icu .dat .spp .nrm content-types.properties \
|
||||||
hijrah-config-Hijrah-umalqura_islamic-umalqura.properties
|
hijrah-config-Hijrah-umalqura_islamic-umalqura.properties
|
||||||
java.base_CLEAN += intrinsic.properties
|
java.base_CLEAN += intrinsic.properties
|
||||||
@ -86,7 +85,6 @@ java.datatransfer_COPY += flavormap.properties
|
|||||||
|
|
||||||
java.desktop_DOCLINT += -Xdoclint:all/protected,-reference \
|
java.desktop_DOCLINT += -Xdoclint:all/protected,-reference \
|
||||||
'-Xdoclint/package:java.*,javax.*'
|
'-Xdoclint/package:java.*,javax.*'
|
||||||
java.desktop_ADD_JAVAC_FLAGS += --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
|
||||||
|
|
||||||
@ -315,7 +313,7 @@ jdk.charsets_COPY += .dat
|
|||||||
|
|
||||||
jdk.compiler_DOCLINT += -Xdoclint:all/protected \
|
jdk.compiler_DOCLINT += -Xdoclint:all/protected \
|
||||||
'-Xdoclint/package:-com.sun.tools.*,-jdk.internal.*,sun.tools.serialver.resources.*'
|
'-Xdoclint/package:-com.sun.tools.*,-jdk.internal.*,sun.tools.serialver.resources.*'
|
||||||
jdk.compiler_ADD_JAVAC_FLAGS += -XDstringConcat=inline
|
jdk.compiler_JAVAC_FLAGS += -XDstringConcat=inline
|
||||||
jdk.compiler_CLEAN_FILES += $(wildcard \
|
jdk.compiler_CLEAN_FILES += $(wildcard \
|
||||||
$(patsubst %, $(TOPDIR)/src/jdk.compiler/share/classes/%/*.properties, \
|
$(patsubst %, $(TOPDIR)/src/jdk.compiler/share/classes/%/*.properties, \
|
||||||
sun/tools/serialver/resources))
|
sun/tools/serialver/resources))
|
||||||
@ -356,7 +354,7 @@ jdk.javadoc_COPY += .xml .css .js .png
|
|||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
jdk.jartool_ADD_JAVAC_FLAGS += -XDstringConcat=inline
|
jdk.jartool_JAVAC_FLAGS += -XDstringConcat=inline
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
@ -436,11 +434,11 @@ 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 -XDstringConcat=inline
|
jdk.internal.vm.ci_JAVAC_FLAGS += -parameters -XDstringConcat=inline
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
jdk.internal.vm.compiler_ADD_JAVAC_FLAGS += -parameters -XDstringConcat=inline \
|
jdk.internal.vm.compiler_JAVAC_FLAGS += -parameters -XDstringConcat=inline \
|
||||||
--add-exports jdk.internal.vm.ci/jdk.vm.ci.aarch64=jdk.internal.vm.compiler \
|
--add-exports jdk.internal.vm.ci/jdk.vm.ci.aarch64=jdk.internal.vm.compiler \
|
||||||
--add-exports jdk.internal.vm.ci/jdk.vm.ci.amd64=jdk.internal.vm.compiler \
|
--add-exports jdk.internal.vm.ci/jdk.vm.ci.amd64=jdk.internal.vm.compiler \
|
||||||
--add-exports jdk.internal.vm.ci/jdk.vm.ci.code=jdk.internal.vm.compiler \
|
--add-exports jdk.internal.vm.ci/jdk.vm.ci.code=jdk.internal.vm.compiler \
|
||||||
@ -509,7 +507,7 @@ jdk.internal.vm.compiler_EXCLUDES += \
|
|||||||
# 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.aot_ADD_JAVAC_FLAGS += -parameters -XDstringConcat=inline \
|
jdk.aot_JAVAC_FLAGS += -parameters -XDstringConcat=inline \
|
||||||
--add-exports jdk.internal.vm.ci/jdk.vm.ci.aarch64=jdk.internal.vm.compiler,jdk.aot \
|
--add-exports jdk.internal.vm.ci/jdk.vm.ci.aarch64=jdk.internal.vm.compiler,jdk.aot \
|
||||||
--add-exports jdk.internal.vm.ci/jdk.vm.ci.amd64=jdk.internal.vm.compiler,jdk.aot \
|
--add-exports jdk.internal.vm.ci/jdk.vm.ci.amd64=jdk.internal.vm.compiler,jdk.aot \
|
||||||
--add-exports jdk.internal.vm.ci/jdk.vm.ci.code=jdk.internal.vm.compiler,jdk.aot \
|
--add-exports jdk.internal.vm.ci/jdk.vm.ci.code=jdk.internal.vm.compiler,jdk.aot \
|
||||||
@ -544,7 +542,7 @@ jdk.localedata_KEEP_ALL_TRANSLATIONS := true
|
|||||||
|
|
||||||
jdk.jfr_DISABLED_WARNINGS += exports
|
jdk.jfr_DISABLED_WARNINGS += exports
|
||||||
jdk.jfr_COPY := .xsd .xml .dtd
|
jdk.jfr_COPY := .xsd .xml .dtd
|
||||||
jdk.jfr_ADD_JAVAC_FLAGS := -XDstringConcat=inline
|
jdk.jfr_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
|
||||||
@ -607,7 +605,7 @@ ifeq ($(MODULE), jdk.aot)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
$(eval $(call SetupJavaCompilation, $(MODULE), \
|
$(eval $(call SetupJavaCompilation, $(MODULE), \
|
||||||
SETUP := $(if $($(MODULE)_SETUP), $($(MODULE)_SETUP), GENERATE_JDKBYTECODE), \
|
SMALL_JAVA := false, \
|
||||||
MODULE := $(MODULE), \
|
MODULE := $(MODULE), \
|
||||||
SRC := $(wildcard $(MODULE_SRC_DIRS)), \
|
SRC := $(wildcard $(MODULE_SRC_DIRS)), \
|
||||||
INCLUDES := $(JDK_USER_DEFINED_FILTER), \
|
INCLUDES := $(JDK_USER_DEFINED_FILTER), \
|
||||||
@ -615,8 +613,9 @@ $(eval $(call SetupJavaCompilation, $(MODULE), \
|
|||||||
BIN := $(if $($(MODULE)_BIN), $($(MODULE)_BIN), $(JDK_OUTPUTDIR)/modules), \
|
BIN := $(if $($(MODULE)_BIN), $($(MODULE)_BIN), $(JDK_OUTPUTDIR)/modules), \
|
||||||
HEADERS := $(SUPPORT_OUTPUTDIR)/headers, \
|
HEADERS := $(SUPPORT_OUTPUTDIR)/headers, \
|
||||||
CREATE_API_DIGEST := true, \
|
CREATE_API_DIGEST := true, \
|
||||||
ADD_JAVAC_FLAGS := \
|
JAVAC_FLAGS := \
|
||||||
$($(MODULE)_ADD_JAVAC_FLAGS) \
|
$($(MODULE)_DOCLINT) \
|
||||||
|
$($(MODULE)_JAVAC_FLAGS) \
|
||||||
--module-source-path $(MODULESOURCEPATH) \
|
--module-source-path $(MODULESOURCEPATH) \
|
||||||
--module-path $(MODULEPATH) \
|
--module-path $(MODULEPATH) \
|
||||||
--system none, \
|
--system none, \
|
||||||
|
@ -28,14 +28,13 @@ default: all
|
|||||||
include $(SPEC)
|
include $(SPEC)
|
||||||
include MakeBase.gmk
|
include MakeBase.gmk
|
||||||
include JavaCompilation.gmk
|
include JavaCompilation.gmk
|
||||||
include SetupJavaCompilers.gmk
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
TOOLS_CLASSES_DIR := $(BUILDTOOLS_OUTPUTDIR)/tools_jigsaw_classes
|
TOOLS_CLASSES_DIR := $(BUILDTOOLS_OUTPUTDIR)/tools_jigsaw_classes
|
||||||
|
|
||||||
$(eval $(call SetupJavaCompilation,BUILD_JIGSAW_TOOLS, \
|
$(eval $(call SetupJavaCompilation, BUILD_JIGSAW_TOOLS, \
|
||||||
SETUP := GENERATE_USINGJDKBYTECODE, \
|
TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK_UPGRADED), \
|
||||||
SRC := $(TOPDIR)/make/jdk/src/classes, \
|
SRC := $(TOPDIR)/make/jdk/src/classes, \
|
||||||
INCLUDES := build/tools/deps \
|
INCLUDES := build/tools/deps \
|
||||||
build/tools/docs \
|
build/tools/docs \
|
||||||
@ -43,10 +42,10 @@ $(eval $(call SetupJavaCompilation,BUILD_JIGSAW_TOOLS, \
|
|||||||
COPY := .properties .html, \
|
COPY := .properties .html, \
|
||||||
BIN := $(TOOLS_CLASSES_DIR), \
|
BIN := $(TOOLS_CLASSES_DIR), \
|
||||||
DISABLED_WARNINGS := fallthrough, \
|
DISABLED_WARNINGS := fallthrough, \
|
||||||
ADD_JAVAC_FLAGS := \
|
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 \
|
||||||
--add-exports jdk.jdeps/com.sun.tools.jdeps=ALL-UNNAMED \
|
--add-exports jdk.jdeps/com.sun.tools.jdeps=ALL-UNNAMED, \
|
||||||
))
|
))
|
||||||
|
|
||||||
TARGETS += $(BUILD_JIGSAW_TOOLS)
|
TARGETS += $(BUILD_JIGSAW_TOOLS)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2016, 2018, 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
|
||||||
@ -30,7 +30,6 @@ include $(SPEC)
|
|||||||
include MakeBase.gmk
|
include MakeBase.gmk
|
||||||
|
|
||||||
include JavaCompilation.gmk
|
include JavaCompilation.gmk
|
||||||
include SetupJavaCompilers.gmk
|
|
||||||
|
|
||||||
TARGETS :=
|
TARGETS :=
|
||||||
|
|
||||||
@ -45,7 +44,7 @@ ifeq ($(INCLUDE_GRAAL), true)
|
|||||||
##############################################################################
|
##############################################################################
|
||||||
# Compile the annotation processors
|
# Compile the annotation processors
|
||||||
$(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_MATCH_PROCESSOR, \
|
$(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_MATCH_PROCESSOR, \
|
||||||
SETUP := GENERATE_OLDBYTECODE, \
|
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
|
||||||
SRC := \
|
SRC := \
|
||||||
$(SRC_DIR)/org.graalvm.compiler.processor/src \
|
$(SRC_DIR)/org.graalvm.compiler.processor/src \
|
||||||
$(SRC_DIR)/org.graalvm.compiler.core.match.processor/src \
|
$(SRC_DIR)/org.graalvm.compiler.core.match.processor/src \
|
||||||
@ -53,6 +52,7 @@ ifeq ($(INCLUDE_GRAAL), true)
|
|||||||
EXCLUDE_FILES := $(EXCLUDE_FILES), \
|
EXCLUDE_FILES := $(EXCLUDE_FILES), \
|
||||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.match.processor, \
|
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.match.processor, \
|
||||||
JAR := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.match.processor.jar, \
|
JAR := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.match.processor.jar, \
|
||||||
|
DISABLED_WARNINGS := options, \
|
||||||
))
|
))
|
||||||
|
|
||||||
TARGETS += $(BUILD_VM_COMPILER_MATCH_PROCESSOR)
|
TARGETS += $(BUILD_VM_COMPILER_MATCH_PROCESSOR)
|
||||||
@ -60,13 +60,14 @@ ifeq ($(INCLUDE_GRAAL), true)
|
|||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
$(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_NODEINFO_PROCESSOR, \
|
$(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_NODEINFO_PROCESSOR, \
|
||||||
SETUP := GENERATE_OLDBYTECODE, \
|
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
|
||||||
SRC := \
|
SRC := \
|
||||||
$(SRC_DIR)/org.graalvm.compiler.processor/src \
|
$(SRC_DIR)/org.graalvm.compiler.processor/src \
|
||||||
$(SRC_DIR)/org.graalvm.compiler.nodeinfo.processor/src \
|
$(SRC_DIR)/org.graalvm.compiler.nodeinfo.processor/src \
|
||||||
, \
|
, \
|
||||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.nodeinfo.processor, \
|
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.nodeinfo.processor, \
|
||||||
JAR := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.nodeinfo.processor.jar, \
|
JAR := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.nodeinfo.processor.jar, \
|
||||||
|
DISABLED_WARNINGS := options, \
|
||||||
))
|
))
|
||||||
|
|
||||||
TARGETS += $(BUILD_VM_COMPILER_NODEINFO_PROCESSOR)
|
TARGETS += $(BUILD_VM_COMPILER_NODEINFO_PROCESSOR)
|
||||||
@ -74,7 +75,8 @@ ifeq ($(INCLUDE_GRAAL), true)
|
|||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
$(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_OPTIONS_PROCESSOR, \
|
$(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_OPTIONS_PROCESSOR, \
|
||||||
SETUP := GENERATE_OLDBYTECODE, \
|
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
|
||||||
|
DISABLED_WARNINGS := options, \
|
||||||
SRC := \
|
SRC := \
|
||||||
$(SRC_DIR)/org.graalvm.compiler.processor/src \
|
$(SRC_DIR)/org.graalvm.compiler.processor/src \
|
||||||
$(SRC_DIR)/org.graalvm.compiler.options.processor/src \
|
$(SRC_DIR)/org.graalvm.compiler.options.processor/src \
|
||||||
@ -88,7 +90,7 @@ ifeq ($(INCLUDE_GRAAL), true)
|
|||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
$(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_REPLACEMENTS_PROCESSOR, \
|
$(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_REPLACEMENTS_PROCESSOR, \
|
||||||
SETUP := GENERATE_OLDBYTECODE, \
|
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
|
||||||
SRC := \
|
SRC := \
|
||||||
$(SRC_DIR)/org.graalvm.compiler.processor/src \
|
$(SRC_DIR)/org.graalvm.compiler.processor/src \
|
||||||
$(SRC_DIR)/org.graalvm.compiler.replacements.processor/src \
|
$(SRC_DIR)/org.graalvm.compiler.replacements.processor/src \
|
||||||
@ -96,6 +98,7 @@ ifeq ($(INCLUDE_GRAAL), true)
|
|||||||
EXCLUDE_FILES := $(EXCLUDE_FILES), \
|
EXCLUDE_FILES := $(EXCLUDE_FILES), \
|
||||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.replacements.verifier, \
|
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.replacements.verifier, \
|
||||||
JAR := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.replacements.verifier.jar, \
|
JAR := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.replacements.verifier.jar, \
|
||||||
|
DISABLED_WARNINGS := options, \
|
||||||
))
|
))
|
||||||
|
|
||||||
TARGETS += $(BUILD_VM_COMPILER_REPLACEMENTS_PROCESSOR)
|
TARGETS += $(BUILD_VM_COMPILER_REPLACEMENTS_PROCESSOR)
|
||||||
@ -103,7 +106,7 @@ ifeq ($(INCLUDE_GRAAL), true)
|
|||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
$(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_SERVICEPROVIDER_PROCESSOR, \
|
$(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_SERVICEPROVIDER_PROCESSOR, \
|
||||||
SETUP := GENERATE_OLDBYTECODE, \
|
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
|
||||||
SRC := \
|
SRC := \
|
||||||
$(SRC_DIR)/org.graalvm.compiler.processor/src \
|
$(SRC_DIR)/org.graalvm.compiler.processor/src \
|
||||||
$(SRC_DIR)/org.graalvm.compiler.serviceprovider.processor/src \
|
$(SRC_DIR)/org.graalvm.compiler.serviceprovider.processor/src \
|
||||||
@ -111,6 +114,7 @@ ifeq ($(INCLUDE_GRAAL), true)
|
|||||||
EXCLUDE_FILES := $(EXCLUDE_FILES), \
|
EXCLUDE_FILES := $(EXCLUDE_FILES), \
|
||||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.serviceprovider.processor, \
|
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.serviceprovider.processor, \
|
||||||
JAR := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.serviceprovider.processor.jar, \
|
JAR := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.serviceprovider.processor.jar, \
|
||||||
|
DISABLED_WARNINGS := options, \
|
||||||
))
|
))
|
||||||
|
|
||||||
TARGETS += $(BUILD_VM_COMPILER_SERVICEPROVIDER_PROCESSOR)
|
TARGETS += $(BUILD_VM_COMPILER_SERVICEPROVIDER_PROCESSOR)
|
||||||
|
@ -28,7 +28,6 @@ default: all
|
|||||||
include $(SPEC)
|
include $(SPEC)
|
||||||
include MakeBase.gmk
|
include MakeBase.gmk
|
||||||
include JavaCompilation.gmk
|
include JavaCompilation.gmk
|
||||||
include SetupJavaCompilers.gmk
|
|
||||||
include TextFileProcessing.gmk
|
include TextFileProcessing.gmk
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
@ -44,7 +43,7 @@ BUILD_TOOLS_SRC_DIRS += \
|
|||||||
#
|
#
|
||||||
|
|
||||||
$(eval $(call SetupJavaCompilation, BUILD_TOOLS_JDK, \
|
$(eval $(call SetupJavaCompilation, BUILD_TOOLS_JDK, \
|
||||||
SETUP := GENERATE_OLDBYTECODE, \
|
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
|
||||||
SRC := $(BUILD_TOOLS_SRC_DIRS), \
|
SRC := $(BUILD_TOOLS_SRC_DIRS), \
|
||||||
EXCLUDES := \
|
EXCLUDES := \
|
||||||
build/tools/classlist \
|
build/tools/classlist \
|
||||||
@ -54,10 +53,10 @@ $(eval $(call SetupJavaCompilation, BUILD_TOOLS_JDK, \
|
|||||||
build/tools/depend \
|
build/tools/depend \
|
||||||
, \
|
, \
|
||||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes, \
|
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes, \
|
||||||
ADD_JAVAC_FLAGS := \
|
DISABLED_WARNINGS := options, \
|
||||||
|
JAVAC_FLAGS := \
|
||||||
--add-exports java.desktop/sun.awt=ALL-UNNAMED \
|
--add-exports java.desktop/sun.awt=ALL-UNNAMED \
|
||||||
--add-exports java.base/sun.text=ALL-UNNAMED \
|
--add-exports java.base/sun.text=ALL-UNNAMED, \
|
||||||
, \
|
|
||||||
))
|
))
|
||||||
|
|
||||||
TARGETS += $(BUILD_TOOLS_JDK)
|
TARGETS += $(BUILD_TOOLS_JDK)
|
||||||
@ -72,10 +71,11 @@ TARGETS += $(COPY_NIMBUS_TEMPLATES)
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
$(eval $(call SetupJavaCompilation, COMPILE_DEPEND, \
|
$(eval $(call SetupJavaCompilation, COMPILE_DEPEND, \
|
||||||
SETUP := GENERATE_OLDBYTECODE, \
|
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
|
||||||
SRC := $(TOPDIR)/make/jdk/src/classes, \
|
SRC := $(TOPDIR)/make/jdk/src/classes, \
|
||||||
INCLUDES := build/tools/depend, \
|
INCLUDES := build/tools/depend, \
|
||||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/depend, \
|
BIN := $(BUILDTOOLS_OUTPUTDIR)/depend, \
|
||||||
|
DISABLED_WARNINGS := options, \
|
||||||
))
|
))
|
||||||
|
|
||||||
DEPEND_SERVICE_PROVIDER := $(BUILDTOOLS_OUTPUTDIR)/depend/META-INF/services/com.sun.source.util.Plugin
|
DEPEND_SERVICE_PROVIDER := $(BUILDTOOLS_OUTPUTDIR)/depend/META-INF/services/com.sun.source.util.Plugin
|
||||||
|
@ -31,14 +31,14 @@ default: all
|
|||||||
|
|
||||||
include $(SPEC)
|
include $(SPEC)
|
||||||
include MakeBase.gmk
|
include MakeBase.gmk
|
||||||
include SetupJavaCompilers.gmk
|
include JavaCompilation.gmk
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Create a jar with our generator class. Using a jar is intentional since it
|
# Create a jar with our generator class. Using a jar is intentional since it
|
||||||
# will load more classes
|
# will load more classes
|
||||||
|
|
||||||
$(eval $(call SetupJavaCompilation, CLASSLIST_JAR, \
|
$(eval $(call SetupJavaCompilation, CLASSLIST_JAR, \
|
||||||
SETUP := GENERATE_JDKBYTECODE, \
|
SMALL_JAVA := false, \
|
||||||
SRC := $(TOPDIR)/make/jdk/src/classes, \
|
SRC := $(TOPDIR)/make/jdk/src/classes, \
|
||||||
INCLUDES := build/tools/classlist, \
|
INCLUDES := build/tools/classlist, \
|
||||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/classlist_classes, \
|
BIN := $(BUILDTOOLS_OUTPUTDIR)/classlist_classes, \
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2014, 2017, 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
|
||||||
@ -27,8 +27,8 @@ default: all
|
|||||||
|
|
||||||
include $(SPEC)
|
include $(SPEC)
|
||||||
include MakeBase.gmk
|
include MakeBase.gmk
|
||||||
|
include JavaCompilation.gmk
|
||||||
include JarArchive.gmk
|
include JarArchive.gmk
|
||||||
include SetupJavaCompilers.gmk
|
|
||||||
include TextFileProcessing.gmk
|
include TextFileProcessing.gmk
|
||||||
|
|
||||||
# This rule will be depended on due to the MANIFEST line
|
# This rule will be depended on due to the MANIFEST line
|
||||||
@ -47,11 +47,13 @@ JIMAGE_PKGS := \
|
|||||||
#
|
#
|
||||||
|
|
||||||
$(eval $(call SetupJavaCompilation, BUILD_JRTFS, \
|
$(eval $(call SetupJavaCompilation, BUILD_JRTFS, \
|
||||||
SETUP := GENERATE_8_BYTECODE, \
|
COMPILER := bootjdk, \
|
||||||
|
TARGET_RELEASE := $(TARGET_RELEASE_JDK8), \
|
||||||
SRC := $(TOPDIR)/src/java.base/share/classes, \
|
SRC := $(TOPDIR)/src/java.base/share/classes, \
|
||||||
EXCLUDE_FILES := module-info.java, \
|
EXCLUDE_FILES := module-info.java, \
|
||||||
INCLUDES := $(JIMAGE_PKGS), \
|
INCLUDES := $(JIMAGE_PKGS), \
|
||||||
BIN := $(SUPPORT_OUTPUTDIR)/jrtfs_classes))
|
BIN := $(SUPPORT_OUTPUTDIR)/jrtfs_classes, \
|
||||||
|
))
|
||||||
|
|
||||||
# Because of the explicit INCLUDES in the compilation setup above, the service provider
|
# Because of the explicit INCLUDES in the compilation setup above, the service provider
|
||||||
# file will not be copied unless META-INF/services would also be added to the INCLUDES.
|
# file will not be copied unless META-INF/services would also be added to the INCLUDES.
|
||||||
@ -62,7 +64,7 @@ $(eval $(call SetupCopyFiles, COPY_JIMAGE_SERVICE_PROVIDER, \
|
|||||||
DEST := $(SUPPORT_OUTPUTDIR)/jrtfs_classes, \
|
DEST := $(SUPPORT_OUTPUTDIR)/jrtfs_classes, \
|
||||||
FILES := META-INF/services/java.nio.file.spi.FileSystemProvider))
|
FILES := META-INF/services/java.nio.file.spi.FileSystemProvider))
|
||||||
|
|
||||||
$(eval $(call SetupJarArchive,BUILD_JRTFS_JAR, \
|
$(eval $(call SetupJarArchive, BUILD_JRTFS_JAR, \
|
||||||
DEPENDENCIES := $(BUILD_JRTFS) $(COPY_JIMAGE_SERVICE_PROVIDER), \
|
DEPENDENCIES := $(BUILD_JRTFS) $(COPY_JIMAGE_SERVICE_PROVIDER), \
|
||||||
SRCS := $(SUPPORT_OUTPUTDIR)/jrtfs_classes, \
|
SRCS := $(SUPPORT_OUTPUTDIR)/jrtfs_classes, \
|
||||||
JAR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base/jrt-fs.jar, \
|
JAR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base/jrt-fs.jar, \
|
||||||
|
@ -121,7 +121,7 @@ JARSIGNER_CMD := $(BOOT_JDK)/bin/jarsigner
|
|||||||
|
|
||||||
JAVA := $(FIXPATH) $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
|
JAVA := $(FIXPATH) $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
|
||||||
JAVA_SMALL := $(FIXPATH) $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS)
|
JAVA_SMALL := $(FIXPATH) $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS)
|
||||||
JAVA_JAVAC := $(FIXPATH) $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS)
|
JAVA_DETACH := $(FIXPATH) $(FIXPATH_DETACH_FLAG) $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
|
||||||
JAVAC := $(FIXPATH) $(JAVAC_CMD)
|
JAVAC := $(FIXPATH) $(JAVAC_CMD)
|
||||||
JAR := $(FIXPATH) $(JAR_CMD)
|
JAR := $(FIXPATH) $(JAR_CMD)
|
||||||
JLINK := $(FIXPATH) $(JLINK_CMD)
|
JLINK := $(FIXPATH) $(JLINK_CMD)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2014, 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
|
||||||
@ -29,18 +29,17 @@ default: all
|
|||||||
include $(SPEC)
|
include $(SPEC)
|
||||||
include MakeBase.gmk
|
include MakeBase.gmk
|
||||||
include JavaCompilation.gmk
|
include JavaCompilation.gmk
|
||||||
include SetupJavaCompilers.gmk
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Setup the compilation of the properties compilation tool. You can depend
|
# Setup the compilation of the properties compilation tool. You can depend
|
||||||
# upon $(BUILD_TOOLS_LANGTOOLS) to trigger a compilation of the tools.
|
# upon $(BUILD_TOOLS_LANGTOOLS) to trigger a compilation of the tools.
|
||||||
$(eval $(call SetupJavaCompilation,BUILD_TOOLS_LANGTOOLS, \
|
$(eval $(call SetupJavaCompilation, BUILD_TOOLS_LANGTOOLS, \
|
||||||
SETUP := BOOT_JAVAC, \
|
COMPILER := bootjdk, \
|
||||||
DISABLE_SJAVAC := true, \
|
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
|
||||||
ADD_JAVAC_FLAGS := -Xprefer:source, \
|
|
||||||
SRC := $(TOPDIR)/make/langtools/tools, \
|
SRC := $(TOPDIR)/make/langtools/tools, \
|
||||||
INCLUDES := compileproperties propertiesparser, \
|
INCLUDES := compileproperties propertiesparser, \
|
||||||
COPY := .properties, \
|
COPY := .properties, \
|
||||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/langtools_tools_classes))
|
BIN := $(BUILDTOOLS_OUTPUTDIR)/langtools_tools_classes, \
|
||||||
|
))
|
||||||
|
|
||||||
all: $(BUILD_TOOLS_LANGTOOLS)
|
all: $(BUILD_TOOLS_LANGTOOLS)
|
||||||
|
@ -350,8 +350,6 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
|
|||||||
BOOT_JDK_SOURCETARGET="-source $OLDEST_BOOT_JDK -target $OLDEST_BOOT_JDK"
|
BOOT_JDK_SOURCETARGET="-source $OLDEST_BOOT_JDK -target $OLDEST_BOOT_JDK"
|
||||||
AC_SUBST(BOOT_JDK_SOURCETARGET)
|
AC_SUBST(BOOT_JDK_SOURCETARGET)
|
||||||
|
|
||||||
AC_SUBST(JAVAC_FLAGS)
|
|
||||||
|
|
||||||
# Check if the boot jdk is 32 or 64 bit
|
# Check if the boot jdk is 32 or 64 bit
|
||||||
if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
|
if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
|
||||||
BOOT_JDK_BITS="64"
|
BOOT_JDK_BITS="64"
|
||||||
@ -471,10 +469,6 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
|
|||||||
AC_MSG_RESULT([$BOOTCYCLE_JVM_ARGS_BIG])
|
AC_MSG_RESULT([$BOOTCYCLE_JVM_ARGS_BIG])
|
||||||
AC_SUBST(BOOTCYCLE_JVM_ARGS_BIG)
|
AC_SUBST(BOOTCYCLE_JVM_ARGS_BIG)
|
||||||
|
|
||||||
# By default, the main javac compilations use big
|
|
||||||
JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
|
|
||||||
AC_SUBST(JAVA_FLAGS_JAVAC)
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([flags for boot jdk java command for small workloads])
|
AC_MSG_CHECKING([flags for boot jdk java command for small workloads])
|
||||||
|
|
||||||
# Use serial gc for small short lived tools if possible
|
# Use serial gc for small short lived tools if possible
|
||||||
|
@ -35,10 +35,6 @@ ifeq ($(firstword $(JAVA)),$(FIXPATH))
|
|||||||
else
|
else
|
||||||
JAVA_EXEC_POS=1
|
JAVA_EXEC_POS=1
|
||||||
endif
|
endif
|
||||||
ifneq ($(word $(JAVA_EXEC_POS),$(SJAVAC_SERVER_JAVA)),$(word $(JAVA_EXEC_POS),$(JAVA)))
|
|
||||||
$(error Bootcycle builds are not possible if --with-sjavac-server-java is specified)
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
# Override specific values to do a boot cycle build
|
# Override specific values to do a boot cycle build
|
||||||
|
|
||||||
@ -54,12 +50,6 @@ JAVA_CMD:=$(BOOT_JDK)/bin/java
|
|||||||
JAVAC_CMD:=$(BOOT_JDK)/bin/javac
|
JAVAC_CMD:=$(BOOT_JDK)/bin/javac
|
||||||
JAR_CMD:=$(BOOT_JDK)/bin/jar
|
JAR_CMD:=$(BOOT_JDK)/bin/jar
|
||||||
JARSIGNER_CMD:=$(BOOT_JDK)/bin/jarsigner
|
JARSIGNER_CMD:=$(BOOT_JDK)/bin/jarsigner
|
||||||
SJAVAC_SERVER_JAVA_CMD:=$(JAVA_CMD)
|
|
||||||
# When building a 32bit target, make sure the sjavac server flags are compatible
|
|
||||||
# with a 32bit JVM.
|
|
||||||
ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
|
|
||||||
SJAVAC_SERVER_JAVA_FLAGS := @BOOTCYCLE_JVM_ARGS_BIG@
|
|
||||||
endif
|
|
||||||
# The bootcycle JVM arguments may differ from the original boot jdk.
|
# The bootcycle JVM arguments may differ from the original boot jdk.
|
||||||
JAVA_FLAGS_BIG := @BOOTCYCLE_JVM_ARGS_BIG@
|
JAVA_FLAGS_BIG := @BOOTCYCLE_JVM_ARGS_BIG@
|
||||||
# Any CDS settings generated for the bootjdk are invalid in the bootcycle build.
|
# Any CDS settings generated for the bootjdk are invalid in the bootcycle build.
|
||||||
|
@ -393,72 +393,11 @@ AC_DEFUN_ONCE([BPERF_SETUP_PRECOMPILED_HEADERS],
|
|||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
AC_DEFUN_ONCE([BPERF_SETUP_SMART_JAVAC],
|
AC_DEFUN_ONCE([BPERF_SETUP_JAVAC_SERVER],
|
||||||
[
|
[
|
||||||
AC_ARG_WITH(sjavac-server-java, [AS_HELP_STRING([--with-sjavac-server-java],
|
UTIL_ARG_ENABLE(NAME: javac-server, DEFAULT: true,
|
||||||
[use this java binary for running the sjavac background server @<:@Boot JDK java@:>@])])
|
RESULT: ENABLE_JAVAC_SERVER,
|
||||||
|
|
||||||
if test "x$with_sjavac_server_java" != x; then
|
|
||||||
SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
|
|
||||||
FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
|
|
||||||
if test "x$FOUND_VERSION" = x; then
|
|
||||||
AC_MSG_ERROR([Could not execute server java: $SJAVAC_SERVER_JAVA])
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
SJAVAC_SERVER_JAVA="$JAVA"
|
|
||||||
fi
|
|
||||||
AC_SUBST(SJAVAC_SERVER_JAVA)
|
|
||||||
|
|
||||||
if test "$MEMORY_SIZE" -gt "3000"; then
|
|
||||||
if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
|
|
||||||
JVM_64BIT=true
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
MX_VALUE=`expr $MEMORY_SIZE / 2`
|
|
||||||
if test "$JVM_64BIT" = true; then
|
|
||||||
# Set ms lower than mx since more than one instance of the server might
|
|
||||||
# get launched at the same time before they figure out which instance won.
|
|
||||||
MS_VALUE=512
|
|
||||||
if test "$MX_VALUE" -gt "2048"; then
|
|
||||||
MX_VALUE=2048
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
MS_VALUE=256
|
|
||||||
if test "$MX_VALUE" -gt "1500"; then
|
|
||||||
MX_VALUE=1500
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if test "$MX_VALUE" -lt "512"; then
|
|
||||||
MX_VALUE=512
|
|
||||||
fi
|
|
||||||
|
|
||||||
JAVAC_SERVER_AVAILABLE=true
|
|
||||||
SJAVAC_MEMORY_OPT="-Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
|
|
||||||
UTIL_ADD_JVM_ARG_IF_OK([$SJAVAC_MEMORY_OPT],SJAVAC_SERVER_JAVA_FLAGS,[$SJAVAC_SERVER_JAVA])
|
|
||||||
if test "x$JVM_ARG_OK" = "xfalse"; then
|
|
||||||
AC_MSG_WARN([Could not set '$SJAVAC_MEMORY_OPT' on bootjdk, disabling sjavac and javac server])
|
|
||||||
JAVAC_SERVER_AVAILABLE=false
|
|
||||||
fi
|
|
||||||
AC_SUBST(SJAVAC_SERVER_JAVA_FLAGS)
|
|
||||||
|
|
||||||
UTIL_ARG_ENABLE(NAME: sjavac, DEFAULT: false, AVAILABLE: $JAVAC_SERVER_AVAILABLE,
|
|
||||||
DESC: [use sjavac to do fast incremental compiles],
|
|
||||||
CHECKING_MSG: [whether to use sjavac],
|
|
||||||
IF_ENABLED: [ ENABLE_SJAVAC="yes" ],
|
|
||||||
IF_DISABLED: [ ENABLE_SJAVAC="no" ])
|
|
||||||
AC_SUBST(ENABLE_SJAVAC)
|
|
||||||
|
|
||||||
UTIL_ARG_ENABLE(NAME: javac-server, DEFAULT: true, AVAILABLE: $JAVAC_SERVER_AVAILABLE,
|
|
||||||
DESC: [enable javac server],
|
DESC: [enable javac server],
|
||||||
CHECKING_MSG: [whether to use javac server],
|
CHECKING_MSG: [whether to use javac server])
|
||||||
IF_ENABLED: [ ENABLE_JAVAC_SERVER="yes" ],
|
|
||||||
IF_DISABLED: [ ENABLE_JAVAC_SERVER="no" ])
|
|
||||||
AC_SUBST(ENABLE_JAVAC_SERVER)
|
AC_SUBST(ENABLE_JAVAC_SERVER)
|
||||||
|
|
||||||
if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
|
|
||||||
# When using a server javac, the small client instances do not need much
|
|
||||||
# resources.
|
|
||||||
JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
|
|
||||||
fi
|
|
||||||
])
|
])
|
||||||
|
@ -261,13 +261,11 @@ BPERF_SETUP_BUILD_CORES
|
|||||||
BPERF_SETUP_BUILD_MEMORY
|
BPERF_SETUP_BUILD_MEMORY
|
||||||
BPERF_SETUP_BUILD_JOBS
|
BPERF_SETUP_BUILD_JOBS
|
||||||
BPERF_SETUP_TEST_JOBS
|
BPERF_SETUP_TEST_JOBS
|
||||||
|
BPERF_SETUP_JAVAC_SERVER
|
||||||
|
|
||||||
# Setup arguments for the boot jdk (after cores and memory have been setup)
|
# Setup arguments for the boot jdk (after cores and memory have been setup)
|
||||||
BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS
|
BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS
|
||||||
|
|
||||||
# Setup smart javac (after cores and memory have been setup)
|
|
||||||
BPERF_SETUP_SMART_JAVAC
|
|
||||||
|
|
||||||
# Setup use of icecc if requested
|
# Setup use of icecc if requested
|
||||||
BPERF_SETUP_ICECC
|
BPERF_SETUP_ICECC
|
||||||
|
|
||||||
|
@ -355,9 +355,6 @@ BOOT_JDK_SOURCETARGET:=@BOOT_JDK_SOURCETARGET@
|
|||||||
# Information about the build system
|
# Information about the build system
|
||||||
NUM_CORES:=@NUM_CORES@
|
NUM_CORES:=@NUM_CORES@
|
||||||
MEMORY_SIZE:=@MEMORY_SIZE@
|
MEMORY_SIZE:=@MEMORY_SIZE@
|
||||||
# Enable sjavac support = use a javac server,
|
|
||||||
# multi core javac compilation and dependency tracking.
|
|
||||||
ENABLE_SJAVAC:=@ENABLE_SJAVAC@
|
|
||||||
ENABLE_JAVAC_SERVER:=@ENABLE_JAVAC_SERVER@
|
ENABLE_JAVAC_SERVER:=@ENABLE_JAVAC_SERVER@
|
||||||
# Store sjavac server synchronization files here, and
|
# Store sjavac server synchronization files here, and
|
||||||
# the sjavac server log files.
|
# the sjavac server log files.
|
||||||
@ -621,9 +618,7 @@ JAVA_FLAGS:=@JAVA_FLAGS@
|
|||||||
JAVA_FLAGS_BIG:=@JAVA_FLAGS_BIG@
|
JAVA_FLAGS_BIG:=@JAVA_FLAGS_BIG@
|
||||||
JAVA_FLAGS_SMALL:=@JAVA_FLAGS_SMALL@
|
JAVA_FLAGS_SMALL:=@JAVA_FLAGS_SMALL@
|
||||||
BUILDJDK_JAVA_FLAGS_SMALL:=@BUILDJDK_JAVA_FLAGS_SMALL@
|
BUILDJDK_JAVA_FLAGS_SMALL:=@BUILDJDK_JAVA_FLAGS_SMALL@
|
||||||
JAVA_FLAGS_JAVAC:=@JAVA_FLAGS_JAVAC@
|
|
||||||
JAVA_TOOL_FLAGS_SMALL:=@JAVA_TOOL_FLAGS_SMALL@
|
JAVA_TOOL_FLAGS_SMALL:=@JAVA_TOOL_FLAGS_SMALL@
|
||||||
SJAVAC_SERVER_JAVA_FLAGS:=@SJAVAC_SERVER_JAVA_FLAGS@
|
|
||||||
|
|
||||||
# The *_CMD variables are defined separately to be easily overridden in bootcycle-spec.gmk
|
# The *_CMD variables are defined separately to be easily overridden in bootcycle-spec.gmk
|
||||||
# for bootcycle-images build. Make sure to keep them in sync. Do not use the *_CMD
|
# for bootcycle-images build. Make sure to keep them in sync. Do not use the *_CMD
|
||||||
@ -636,12 +631,11 @@ JLINK_CMD := @JLINK@
|
|||||||
JMOD_CMD := @JMOD@
|
JMOD_CMD := @JMOD@
|
||||||
JARSIGNER_CMD:=@JARSIGNER@
|
JARSIGNER_CMD:=@JARSIGNER@
|
||||||
JJS_CMD:=@JJS@
|
JJS_CMD:=@JJS@
|
||||||
SJAVAC_SERVER_JAVA_CMD:=@SJAVAC_SERVER_JAVA@
|
|
||||||
# These variables are meant to be used. They are defined with = instead of := to make
|
# These variables are meant to be used. They are defined with = instead of := to make
|
||||||
# it possible to override only the *_CMD variables.
|
# it possible to override only the *_CMD variables.
|
||||||
JAVA=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
|
JAVA=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
|
||||||
JAVA_SMALL=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS)
|
JAVA_SMALL=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS)
|
||||||
JAVA_JAVAC=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_JAVAC) $(JAVA_FLAGS)
|
JAVA_DETACH =@FIXPATH@ @FIXPATH_DETACH_FLAG@ $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
|
||||||
JAVAC=@FIXPATH@ $(JAVAC_CMD)
|
JAVAC=@FIXPATH@ $(JAVAC_CMD)
|
||||||
JAVADOC=@FIXPATH@ $(JAVADOC_CMD)
|
JAVADOC=@FIXPATH@ $(JAVADOC_CMD)
|
||||||
JAR=@FIXPATH@ $(JAR_CMD)
|
JAR=@FIXPATH@ $(JAR_CMD)
|
||||||
@ -649,15 +643,6 @@ JLINK = @FIXPATH@ $(JLINK_CMD) $(JAVA_TOOL_FLAGS_SMALL)
|
|||||||
JMOD = @FIXPATH@ $(JMOD_CMD) $(JAVA_TOOL_FLAGS_SMALL)
|
JMOD = @FIXPATH@ $(JMOD_CMD) $(JAVA_TOOL_FLAGS_SMALL)
|
||||||
JARSIGNER=@FIXPATH@ $(JARSIGNER_CMD)
|
JARSIGNER=@FIXPATH@ $(JARSIGNER_CMD)
|
||||||
JJS=@FIXPATH@ $(JJS_CMD) $(JAVA_TOOL_FLAGS_SMALL)
|
JJS=@FIXPATH@ $(JJS_CMD) $(JAVA_TOOL_FLAGS_SMALL)
|
||||||
# A specific java binary with specific options can be used to run
|
|
||||||
# the long running background sjavac servers and other long running tasks.
|
|
||||||
SJAVAC_SERVER_JAVA=@FIXPATH@ @FIXPATH_DETACH_FLAG@ $(SJAVAC_SERVER_JAVA_CMD) \
|
|
||||||
$(SJAVAC_SERVER_JAVA_FLAGS)
|
|
||||||
|
|
||||||
# Hotspot sets this variable before reading the SPEC when compiling sa-jdi.jar. Avoid
|
|
||||||
# overriding that value by using ?=.
|
|
||||||
JAVAC_FLAGS?=@JAVAC_FLAGS@
|
|
||||||
|
|
||||||
|
|
||||||
BUILD_JAVA_FLAGS := @BOOTCYCLE_JVM_ARGS_BIG@
|
BUILD_JAVA_FLAGS := @BOOTCYCLE_JVM_ARGS_BIG@
|
||||||
BUILD_JAVA=@FIXPATH@ $(BUILD_JDK)/bin/java $(BUILD_JAVA_FLAGS)
|
BUILD_JAVA=@FIXPATH@ $(BUILD_JDK)/bin/java $(BUILD_JAVA_FLAGS)
|
||||||
|
@ -23,10 +23,6 @@
|
|||||||
# questions.
|
# questions.
|
||||||
#
|
#
|
||||||
|
|
||||||
# When you read this source. Remember that $(sort ...) has the side effect
|
|
||||||
# of removing duplicates. It is actually this side effect that is
|
|
||||||
# desired whenever sort is used below!
|
|
||||||
|
|
||||||
ifndef _JAVA_COMPILATION_GMK
|
ifndef _JAVA_COMPILATION_GMK
|
||||||
_JAVA_COMPILATION_GMK := 1
|
_JAVA_COMPILATION_GMK := 1
|
||||||
|
|
||||||
@ -39,30 +35,22 @@ endif
|
|||||||
include JarArchive.gmk
|
include JarArchive.gmk
|
||||||
include ZipArchive.gmk
|
include ZipArchive.gmk
|
||||||
|
|
||||||
# Setup make rules for defining a Java compiler, which is needed to compile
|
###
|
||||||
# Java code. This rule generates no output.
|
### Definitions for common release targets
|
||||||
#
|
###
|
||||||
# Parameter 1 is the name of the compiler definition. This name needs to be
|
|
||||||
# passed to SetupJavaCompilation. This name is used as variable prefix.
|
# Create classes that can run on the bootjdk
|
||||||
#
|
TARGET_RELEASE_BOOTJDK := $(BOOT_JDK_SOURCETARGET)
|
||||||
# Remaining parameters are named arguments. These include:
|
|
||||||
# JVM:=The jvm used to run the javac command
|
# Create classes that can be used in (or be a part of) the new jdk we're building
|
||||||
# JAVAC:=The javac jar and bootstrap classpath changes, or just bin/javac if JVM is left out
|
TARGET_RELEASE_NEWJDK := -source $(JDK_SOURCE_TARGET_VERSION) -target $(JDK_SOURCE_TARGET_VERSION)
|
||||||
# FLAGS:=Flags to be supplied to javac
|
|
||||||
# SERVER_DIR:=Use a javac server (-XDserver) and store the server related files here
|
# Create classes that can be used in JDK 8, for legacy support
|
||||||
# SERVER_JVM:=Use this JVM for the server. Defaults to the JVM above.
|
TARGET_RELEASE_JDK8 := --release 8
|
||||||
# DISABLE_SJAVAC:=Set to true if this setup does not support sjavac
|
|
||||||
SetupJavaCompiler = $(NamedParamsMacroTemplate)
|
# Create classes for the new jdk, relying only on the modules of the new jdk
|
||||||
define SetupJavaCompilerBody
|
TARGET_RELEASE_NEWJDK_UPGRADED := $(TARGET_RELEASE_NEWJDK) \
|
||||||
# The port file contains the tcp/ip on which the server listens
|
--upgrade-module-path $(JDK_OUTPUTDIR)/modules --system none
|
||||||
# and the cookie necessary to talk to the server.
|
|
||||||
$1_SJAVAC_PORTFILE:=$$($1_SERVER_DIR)/server.port
|
|
||||||
# You can use a different JVM to run the background javac server.
|
|
||||||
ifeq ($$($1_SERVER_JVM),)
|
|
||||||
# It defaults to the same JVM that is used to start the javac command.
|
|
||||||
$1_SERVER_JVM:=$$($1_JVM)
|
|
||||||
endif
|
|
||||||
endef
|
|
||||||
|
|
||||||
define add_file_to_copy
|
define add_file_to_copy
|
||||||
# param 1 = BUILD_MYPACKAGE
|
# param 1 = BUILD_MYPACKAGE
|
||||||
@ -76,7 +64,7 @@ define add_file_to_copy
|
|||||||
$1_COPY_$$($2_TARGET) := 1
|
$1_COPY_$$($2_TARGET) := 1
|
||||||
# Now we can setup the dependency that will trigger the copying.
|
# Now we can setup the dependency that will trigger the copying.
|
||||||
$$($1_BIN)$$($1_MODULE_SUBDIR)$$($2_TARGET) : $2
|
$$($1_BIN)$$($1_MODULE_SUBDIR)$$($2_TARGET) : $2
|
||||||
$$(call LogInfo, Copying $$(patsubst $(OUTPUTDIR)/%,%, $$@))
|
$$(call LogInfo, Copying $$(patsubst $$(OUTPUTDIR)/%,%, $$@))
|
||||||
$$(install-file)
|
$$(install-file)
|
||||||
$(CHMOD) -f ug+w $$@
|
$(CHMOD) -f ug+w $$@
|
||||||
|
|
||||||
@ -86,10 +74,7 @@ define add_file_to_copy
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
# This macro is used only for properties files that are to be
|
# This macro is used only for properties files that are to be
|
||||||
# copied over to the classes directory in cleaned form:
|
# copied over to the classes directory in cleaned form.
|
||||||
# Previously this was inconsistently done in different repositories.
|
|
||||||
# This is the new clean standard. Though it is to be superseded by
|
|
||||||
# a standard annotation processor from with sjavac.
|
|
||||||
#
|
#
|
||||||
# An empty echo ensures that the input to sed always ends with a newline.
|
# An empty echo ensures that the input to sed always ends with a newline.
|
||||||
# Certain implementations (e.g. Solaris) will skip the last line without
|
# Certain implementations (e.g. Solaris) will skip the last line without
|
||||||
@ -120,12 +105,12 @@ define add_file_to_clean
|
|||||||
ifneq ($$($1_CLEAN_$$($2_TARGET)), 1)
|
ifneq ($$($1_CLEAN_$$($2_TARGET)), 1)
|
||||||
$1_CLEAN_$$($2_TARGET) := 1
|
$1_CLEAN_$$($2_TARGET) := 1
|
||||||
$$($1_BIN)$$($1_MODULE_SUBDIR)$$($2_TARGET) : $2
|
$$($1_BIN)$$($1_MODULE_SUBDIR)$$($2_TARGET) : $2
|
||||||
$$(call LogInfo, Cleaning $$(patsubst $(OUTPUTDIR)/%,%, $$@))
|
$$(call LogInfo, Cleaning $$(patsubst $$(OUTPUTDIR)/%,%, $$@))
|
||||||
$$(call MakeTargetDir)
|
$$(call MakeTargetDir)
|
||||||
( $(CAT) $$< && $(ECHO) "" ) \
|
( $(CAT) $$< && $(ECHO) "" ) \
|
||||||
| $(SED) -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' \
|
| $(SED) -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' \
|
||||||
-e 's/\([^\\]\)!/\1\\!/g' -e 's/^[ ]*#.*/#/g' \
|
-e 's/\([^\\]\)!/\1\\!/g' -e 's/^[ ]*#.*/#/g' \
|
||||||
| $(SED) -f "$(TOPDIR)/make/common/support/unicode2x.sed" \
|
| $(SED) -f "$$(TOPDIR)/make/common/support/unicode2x.sed" \
|
||||||
| $(SED) -e '/^#/d' -e '/^$$$$/d' \
|
| $(SED) -e '/^#/d' -e '/^$$$$/d' \
|
||||||
-e :a -e '/\\$$$$/N; s/\\\n//; ta' \
|
-e :a -e '/\\$$$$/N; s/\\\n//; ta' \
|
||||||
-e 's/^[ ]*//;s/[ ]*$$$$//' \
|
-e 's/^[ ]*//;s/[ ]*$$$$//' \
|
||||||
@ -151,9 +136,12 @@ endef
|
|||||||
# The target for public API digest is returned in $1_API_TARGET.
|
# The target for public API digest is returned in $1_API_TARGET.
|
||||||
#
|
#
|
||||||
# Remaining parameters are named arguments. These include:
|
# Remaining parameters are named arguments. These include:
|
||||||
# SETUP:=must point to a previously setup java compiler, for example: SETUP:=BOOTJAVAC
|
# SMALL_JAVA:=set to false to run javac as a "big" java app
|
||||||
# JVM:=path to ..bin/java
|
# COMPILER:=bootjdk or interim, the latter is default
|
||||||
# ADD_JAVAC_FLAGS:=javac flags to append to the default ones.
|
# TARGET_RELEASE:=javac flags to set the targeted jdk release (-source/-target or --release)
|
||||||
|
# Defaults to $(TARGET_RELEASE_NEWJDK).
|
||||||
|
# JAVAC_FLAGS:=javac flags to append to the default ones.
|
||||||
|
# JAVA_FLAGS:=flags to be appended to the java launching the compiler
|
||||||
# DISABLED_WARNINGS:=list of Xlint warnings that should be disabled
|
# 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.
|
||||||
@ -174,14 +162,12 @@ endef
|
|||||||
# specify files that need to be generated by other rules first.
|
# specify files that need to be generated by other rules first.
|
||||||
# HEADERS:=path to directory where all generated c-headers are written.
|
# HEADERS:=path to directory where all generated c-headers are written.
|
||||||
# DEPENDS:=Extra dependecy
|
# DEPENDS:=Extra dependecy
|
||||||
# DISABLE_SJAVAC:=Explicitly disable the use of sjavac for this compilation unit.
|
|
||||||
# KEEP_DUPS:=Do not remove duplicate file names from different source roots.
|
# KEEP_DUPS:=Do not remove duplicate file names from different source roots.
|
||||||
# FAIL_NO_SRC:=Set to false to not fail the build if no source files are found,
|
# FAIL_NO_SRC:=Set to false to not fail the build if no source files are found,
|
||||||
# default is true.
|
# default is true.
|
||||||
# DEBUG_SYMBOLS:=Set to false to disable generation of debug symbols.
|
|
||||||
# CREATE_API_DIGEST:=Set to true to use a javac plugin to generate a public API
|
# CREATE_API_DIGEST:=Set to true to use a javac plugin to generate a public API
|
||||||
# hash which can be used for down stream dependencies to only rebuild
|
# hash which can be used for down stream dependencies to only rebuild
|
||||||
# when the API changes. Implicitly used in sjavac.
|
# when the API changes.
|
||||||
# KEEP_ALL_TRANSLATIONS:=Set to true to skip translation filtering
|
# KEEP_ALL_TRANSLATIONS:=Set to true to skip translation filtering
|
||||||
SetupJavaCompilation = $(NamedParamsMacroTemplate)
|
SetupJavaCompilation = $(NamedParamsMacroTemplate)
|
||||||
define SetupJavaCompilationBody
|
define SetupJavaCompilationBody
|
||||||
@ -191,14 +177,76 @@ define SetupJavaCompilationBody
|
|||||||
$$(error Must specify BIN (in $1))
|
$$(error Must specify BIN (in $1))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Extract the info from the java compiler setup.
|
ifeq ($$($1_SMALL_JAVA), )
|
||||||
$1_JVM := $$($$($1_SETUP)_JVM)
|
# If unspecified, default to true
|
||||||
$1_JAVAC := $$($$($1_SETUP)_JAVAC)
|
$1_SMALL_JAVA := true
|
||||||
$1_FLAGS :=
|
|
||||||
ifneq ($$($1_DEBUG_SYMBOLS), false)
|
|
||||||
$1_FLAGS := -g
|
|
||||||
endif
|
endif
|
||||||
$1_FLAGS += $$($$($1_SETUP)_FLAGS) $$($1_ADD_JAVAC_FLAGS) $(JAVAC_FLAGS)
|
|
||||||
|
ifeq ($$($1_COMPILER), )
|
||||||
|
# If unspecified, default to interim compiler
|
||||||
|
$1_COMPILER := interim
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($$($1_COMPILER), bootjdk)
|
||||||
|
# Javac server is not available when using the bootjdk compiler.
|
||||||
|
$1_JAVAC_CMD := $$(JAVAC)
|
||||||
|
|
||||||
|
ifeq ($$($1_SMALL_JAVA), true)
|
||||||
|
$1_FLAGS += $$(addprefix -J, $$(JAVA_FLAGS_SMALL))
|
||||||
|
endif
|
||||||
|
ifeq ($$($1_JAVA_FLAGS), true)
|
||||||
|
$1_FLAGS += $$(addprefix -J, $$($1_JAVA_FLAGS))
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($$($1_TARGET_RELEASE), )
|
||||||
|
# If unspecified, default to the new jdk we're building
|
||||||
|
$1_TARGET_RELEASE := $$(TARGET_RELEASE_BOOTJDK)
|
||||||
|
endif
|
||||||
|
else ifeq ($$($1_COMPILER), interim)
|
||||||
|
# Use java server if it is enabled, and the user does not want a specialized
|
||||||
|
# class path.
|
||||||
|
ifeq ($$($1_ENABLE_JAVAC_SERVER+$$($1_CLASSPATH)), true+)
|
||||||
|
$1_JAVAC := $$(INTERIM_LANGTOOLS_ARGS) -m jdk.compiler.interim/com.sun.tools.sjavac.Main
|
||||||
|
|
||||||
|
# How to launch the server. This must use JAVA_DETACH, which is the "big" java
|
||||||
|
# with an ability to detach from fixpath (on Windows)
|
||||||
|
# This will be executed by the client, if needed.
|
||||||
|
$1_JAVAC_SERVER_CMD := $$(JAVA_DETACH) $$($1_JAVA_FLAGS) $$($1_JAVAC)
|
||||||
|
$1_ESCAPED_CMD := $$(subst $$(SPACE),%20,$$(subst $$(COMMA),%2C,$$(strip $$($1_JAVAC_SERVER_CMD))))
|
||||||
|
|
||||||
|
# The port file contains the tcp/ip on which the server listens
|
||||||
|
# and the cookie necessary to talk to the server.
|
||||||
|
$1_JAVA_SERVER_FLAGS := --server:portfile=$$(SJAVAC_SERVER_DIR)/server.port,sjavac=$$($1_ESCAPED_CMD)
|
||||||
|
|
||||||
|
# Always use small to launch client
|
||||||
|
$1_JAVAC_CMD := $$(JAVA_SMALL) $$($1_JAVA_FLAGS) $$($1_JAVAC) $$($1_JAVA_SERVER_FLAGS)
|
||||||
|
else
|
||||||
|
# No javac server
|
||||||
|
$1_JAVAC := $$(INTERIM_LANGTOOLS_ARGS) -m jdk.compiler.interim/com.sun.tools.javac.Main
|
||||||
|
|
||||||
|
ifeq ($$($1_SMALL_JAVA), true)
|
||||||
|
$1_JAVAC_CMD := $$(JAVA_SMALL) $$($1_JAVA_FLAGS) $$($1_JAVAC)
|
||||||
|
else
|
||||||
|
$1_JAVAC_CMD := $$(JAVA) $$($1_JAVA_FLAGS) $$($1_JAVAC)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($$($1_TARGET_RELEASE), )
|
||||||
|
# If unspecified, default to the new jdk we're building
|
||||||
|
$1_TARGET_RELEASE := $$(TARGET_RELEASE_NEWJDK)
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
$$(error Invalid value for COMPILER in SetupJavaCompilation for $1: '$$($1_COMPILER)')
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Allow overriding on the command line
|
||||||
|
JAVA_WARNINGS_ARE_ERRORS ?= -Werror
|
||||||
|
|
||||||
|
# Tell javac to do exactly as told and no more
|
||||||
|
PARANOIA_FLAGS := -implicit:none -Xprefer:source -XDignore.symbol.file=true -encoding ascii
|
||||||
|
|
||||||
|
$1_FLAGS += -g -Xlint:all --doclint-format html5 $$($1_TARGET_RELEASE) $$(PARANOIA_FLAGS) $$(JAVA_WARNINGS_ARE_ERRORS)
|
||||||
|
$1_FLAGS += $$($1_JAVAC_FLAGS)
|
||||||
|
|
||||||
ifneq ($$($1_DISABLED_WARNINGS), )
|
ifneq ($$($1_DISABLED_WARNINGS), )
|
||||||
$1_FLAGS += -Xlint:$$(call CommaList, $$(addprefix -, $$($1_DISABLED_WARNINGS)))
|
$1_FLAGS += -Xlint:$$(call CommaList, $$(addprefix -, $$($1_DISABLED_WARNINGS)))
|
||||||
@ -208,13 +256,6 @@ define SetupJavaCompilationBody
|
|||||||
$1_FLAGS += -cp $$(call PathList, $$($1_CLASSPATH))
|
$1_FLAGS += -cp $$(call PathList, $$($1_CLASSPATH))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($$($1_JAVAC),)
|
|
||||||
$$(error The Java compilation $1 refers to a non-existant java compiler setup $$($1_SETUP))
|
|
||||||
endif
|
|
||||||
$1_SJAVAC_PORTFILE := $$($$($1_SETUP)_SJAVAC_PORTFILE)
|
|
||||||
$1_SERVER_JVM := $$($$($1_SETUP)_SERVER_JVM)
|
|
||||||
$1_DISABLE_SJAVAC := $$($$($1_SETUP)_DISABLE_SJAVAC)
|
|
||||||
|
|
||||||
ifneq ($$($1_MODULE), )
|
ifneq ($$($1_MODULE), )
|
||||||
$1_MODULE_SUBDIR := /$$($1_MODULE)
|
$1_MODULE_SUBDIR := /$$($1_MODULE)
|
||||||
endif
|
endif
|
||||||
@ -264,13 +305,10 @@ define SetupJavaCompilationBody
|
|||||||
# Remove duplicate source files by keeping the first found of each duplicate.
|
# Remove duplicate source files by keeping the first found of each duplicate.
|
||||||
# This allows for automatic overrides with custom or platform specific versions
|
# This allows for automatic overrides with custom or platform specific versions
|
||||||
# source files.
|
# source files.
|
||||||
#
|
|
||||||
# For the smart javac wrapper case, add each removed file to an extra exclude
|
|
||||||
# file list to prevent sjavac from finding duplicate sources.
|
|
||||||
$1_SRCS := $$(strip $$(foreach s, $$($1_SRCS), \
|
$1_SRCS := $$(strip $$(foreach s, $$($1_SRCS), \
|
||||||
$$(eval relative_src := $$(call remove-prefixes, $$($1_SRC), $$(s))) \
|
$$(eval relative_src := $$(call remove-prefixes, $$($1_SRC), $$(s))) \
|
||||||
$$(if $$($1_$$(relative_src)), \
|
$$(if $$($1_$$(relative_src)), \
|
||||||
$$(eval $1_SJAVAC_EXCLUDE_FILES += $$(s)), \
|
, \
|
||||||
$$(eval $1_$$(relative_src) := 1) $$(s))))
|
$$(eval $1_$$(relative_src) := 1) $$(s))))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -343,92 +381,15 @@ define SetupJavaCompilationBody
|
|||||||
# and remove .java at the end.
|
# and remove .java at the end.
|
||||||
$1_REWRITE_INTO_CLASSES:=$$(foreach i,$$($1_SRC),-e 's|$$i/||g') -e 's|/|.|g' -e 's|.java$$$$||g'
|
$1_REWRITE_INTO_CLASSES:=$$(foreach i,$$($1_SRC),-e 's|$$i/||g') -e 's|/|.|g' -e 's|.java$$$$||g'
|
||||||
|
|
||||||
# Create SJAVAC variable from JAVAC variable. Expects $1_JAVAC to be
|
|
||||||
# "bootclasspathprepend -cp .../javac.jar com.sun.tools.javac.Main"
|
|
||||||
# and javac is simply replaced with sjavac.
|
|
||||||
$1_SJAVAC:=$$(subst com.sun.tools.javac.Main,com.sun.tools.sjavac.Main,$$($1_JAVAC))
|
|
||||||
|
|
||||||
# Set the $1_REMOTE to spawn a background javac server.
|
|
||||||
$1_REMOTE:=--server:portfile=$$($1_SJAVAC_PORTFILE),id=$1,sjavac=$$(subst \
|
|
||||||
$$(SPACE),%20,$$(subst $$(COMMA),%2C,$$(strip $$($1_SERVER_JVM) $$($1_SJAVAC))))
|
|
||||||
|
|
||||||
$1_COMPILE_TARGET := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_batch
|
$1_COMPILE_TARGET := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_batch
|
||||||
$1_API_TARGET := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_pubapi
|
$1_API_TARGET := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_pubapi
|
||||||
|
|
||||||
ifeq ($$($1_DISABLE_SJAVAC)x$$(ENABLE_SJAVAC),xyes)
|
# Put headers in a temp dir to filter out those that actually
|
||||||
# Using sjavac to compile.
|
# changed before copying them to the real header dir.
|
||||||
|
ifneq (,$$($1_HEADERS))
|
||||||
|
$1_HEADERS_ARG := -h $$($1_HEADERS).$1.tmp
|
||||||
|
|
||||||
# Create the sjavac wrapper command line. Sjavac doesn't handle patterns that
|
$$($1_HEADERS)/_the.$1_headers: $$($1_COMPILE_TARGET)
|
||||||
# match the absolute path, only the part inside each src dir. Instead -i and
|
|
||||||
# -x flags apply only to the next -src arg on the command line.
|
|
||||||
$1_EXCLUDE_FILES_ABS := $$(filter /%, $$($1_EXCLUDE_FILES)) $$($1_SJAVAC_EXCLUDE_FILES)
|
|
||||||
$1_EXCLUDE_FILES_REL := $$(filter-out /%, $$($1_EXCLUDE_FILES))
|
|
||||||
$1_SJAVAC_ARGS_STRING := $$(foreach s, $$(patsubst %/, %, $$($1_SRC)), \
|
|
||||||
$$(addprefix -x ,$$(addsuffix /**,$$($1_EXCLUDES))) \
|
|
||||||
$$(addprefix -i ,$$(addsuffix /**,$$($1_INCLUDES))) \
|
|
||||||
$$(addprefix -x **,$$(strip $$($1_EXCLUDE_FILES_REL))) \
|
|
||||||
$$(addprefix -i **,$$(strip $$($1_INCLUDE_FILES))) \
|
|
||||||
$$(addprefix -x , $$(strip $$(patsubst $$(s)/%, %, $$(filter $$(s)/%, $$($1_EXCLUDE_FILES_ABS))))) \
|
|
||||||
-src $$(s))
|
|
||||||
|
|
||||||
ifneq ($$(word 20, $$($1_SJAVAC_ARGS_STRING)), )
|
|
||||||
$1_SJAVAC_ARGS_FILE := $$($1_BIN)/_the.$1_args
|
|
||||||
$1_SJAVAC_ARGS := @$$($1_SJAVAC_ARGS_FILE)
|
|
||||||
else
|
|
||||||
$1_SJAVAC_ARGS := $$($1_SJAVAC_ARGS_STRING)
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
ifneq (,$$($1_HEADERS))
|
|
||||||
$1_HEADERS_ARG := -h $$($1_HEADERS)
|
|
||||||
endif
|
|
||||||
|
|
||||||
$1_VARDEPS := $$($1_JVM) $$($1_SJAVAC) $$($1_SJAVAC_ARGS_STRING) $$($1_FLAGS) \
|
|
||||||
$$($1_HEADERS_ARG) $$($1_BIN) $$($1_EXCLUDES) $$($1_INCLUDES) \
|
|
||||||
$$($1_EXCLUDE_FILES) $$($1_INCLUDE_FILES)
|
|
||||||
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
|
|
||||||
$$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1.vardeps)
|
|
||||||
|
|
||||||
$$($1_COMPILE_TARGET): $$($1_SRCS) $$($1_DEPENDS) $$($1_VARDEPS_FILE)
|
|
||||||
$$(call MakeDir, $$(@D) $$(dir $$($1_SJAVAC_PORTFILE)))
|
|
||||||
$$(eval $$(call ListPathsSafely,$1_SRCS, $$@.tmp))
|
|
||||||
ifneq ($$($1_SJAVAC_ARGS_FILE), )
|
|
||||||
$$(eval $$(call ListPathsSafely,$1_SJAVAC_ARGS_STRING, $$($1_SJAVAC_ARGS_FILE)))
|
|
||||||
endif
|
|
||||||
$$(call LogWarn, Compiling $1)
|
|
||||||
$$(call ExecuteWithLog, $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$$($1_SAFE_NAME)_batch, \
|
|
||||||
$$($1_JVM) $$($1_SJAVAC) \
|
|
||||||
$$($1_REMOTE) \
|
|
||||||
-j 1 \
|
|
||||||
--permit-unidentified-artifacts \
|
|
||||||
--permit-sources-without-package \
|
|
||||||
--compare-found-sources $$@.tmp \
|
|
||||||
--log=$(LOG_LEVEL) \
|
|
||||||
--state-dir=$$($1_BIN)$$($1_MODULE_SUBDIR) \
|
|
||||||
$$($1_SJAVAC_ARGS) \
|
|
||||||
$$($1_FLAGS) \
|
|
||||||
$$($1_HEADERS_ARG) \
|
|
||||||
-d $$($1_BIN)) && \
|
|
||||||
$(MV) $$@.tmp $$@
|
|
||||||
# Create a pubapi file that only changes when the pubapi changes. Dependent
|
|
||||||
# compilations can use this file to only get recompiled when pubapi has changed.
|
|
||||||
# Grep returns 1 if no matching lines are found. Do not fail for this.
|
|
||||||
$(GREP) -e "^I" $$($1_BIN)$$($1_MODULE_SUBDIR)/javac_state \
|
|
||||||
> $$($1_API_TARGET).tmp || test "$$$$?" = "1"
|
|
||||||
if [ ! -f $$($1_API_TARGET) ] \
|
|
||||||
|| [ "`$(DIFF) $$($1_API_TARGET) $$($1_API_TARGET).tmp`" != "" ]; then \
|
|
||||||
$(MV) $$($1_API_TARGET).tmp $$($1_API_TARGET); \
|
|
||||||
fi
|
|
||||||
|
|
||||||
else
|
|
||||||
# Using plain javac to batch compile everything.
|
|
||||||
|
|
||||||
# When building in batch, put headers in a temp dir to filter out those that actually
|
|
||||||
# changed before copying them to the real header dir.
|
|
||||||
ifneq (,$$($1_HEADERS))
|
|
||||||
$1_HEADERS_ARG := -h $$($1_HEADERS).$1.tmp
|
|
||||||
|
|
||||||
$$($1_HEADERS)/_the.$1_headers: $$($1_COMPILE_TARGET)
|
|
||||||
$$(call MakeTargetDir)
|
$$(call MakeTargetDir)
|
||||||
if [ -d "$$($1_HEADERS).$1.tmp" ]; then \
|
if [ -d "$$($1_HEADERS).$1.tmp" ]; then \
|
||||||
for f in `$(CD) $$($1_HEADERS).$1.tmp && $(FIND) . -type f`; do \
|
for f in `$(CD) $$($1_HEADERS).$1.tmp && $(FIND) . -type f`; do \
|
||||||
@ -442,43 +403,35 @@ define SetupJavaCompilationBody
|
|||||||
$(RM) -r $$($1_HEADERS).$1.tmp
|
$(RM) -r $$($1_HEADERS).$1.tmp
|
||||||
$(TOUCH) $$@
|
$(TOUCH) $$@
|
||||||
|
|
||||||
$1_HEADER_TARGETS := $$($1_HEADERS)/_the.$1_headers
|
$1_HEADER_TARGETS := $$($1_HEADERS)/_the.$1_headers
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$1_VARDEPS := $$($1_JVM) $$($1_JAVAC) $$($1_FLAGS) $$($1_BIN) \
|
$1_VARDEPS := $$($1_JAVAC_CMD) $$($1_FLAGS) $$($1_BIN) \
|
||||||
$$($1_HEADERS_ARG) $$($1_EXCLUDES) $$($1_INCLUDES) \
|
$$($1_HEADERS_ARG) $$($1_EXCLUDES) $$($1_INCLUDES) \
|
||||||
$$($1_EXCLUDE_FILES) $$($1_INCLUDE_FILES)
|
$$($1_EXCLUDE_FILES) $$($1_INCLUDE_FILES)
|
||||||
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
|
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
|
||||||
$$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1.vardeps)
|
$$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1.vardeps)
|
||||||
|
|
||||||
ifeq ($$($1_DISABLE_SJAVAC)x$(ENABLE_JAVAC_SERVER), xyes)
|
ifeq ($$($1_CREATE_API_DIGEST), true)
|
||||||
$1_JAVAC_CMD := $$($1_SJAVAC) $$($1_REMOTE)
|
$1_API_DIGEST_FLAGS := \
|
||||||
else
|
-classpath $$(BUILDTOOLS_OUTPUTDIR)/depend \
|
||||||
$1_JAVAC_CMD := $$($1_JAVAC)
|
-Xplugin:"depend $$($1_API_TARGET)" \
|
||||||
endif
|
#
|
||||||
|
|
||||||
ifeq ($$($1_CREATE_API_DIGEST), true)
|
$1_EXTRA_DEPS := $$(BUILDTOOLS_OUTPUTDIR)/depend/_the.COMPILE_DEPEND_batch
|
||||||
$1_API_DIGEST_FLAGS := \
|
endif
|
||||||
-classpath $(BUILDTOOLS_OUTPUTDIR)/depend \
|
|
||||||
-Xplugin:"depend $$($1_API_TARGET)" \
|
|
||||||
#
|
|
||||||
|
|
||||||
$1_EXTRA_DEPS := $(BUILDTOOLS_OUTPUTDIR)/depend/_the.COMPILE_DEPEND_batch
|
# Pass along all sources to javac using an @file.
|
||||||
endif
|
$$($1_COMPILE_TARGET): $$($1_SRCS) $$($1_DEPENDS) $$($1_VARDEPS_FILE) \
|
||||||
|
$$($1_EXTRA_DEPS)
|
||||||
# When not using sjavac, pass along all sources to javac using an @file.
|
|
||||||
$$($1_COMPILE_TARGET): $$($1_SRCS) $$($1_DEPENDS) $$($1_VARDEPS_FILE) \
|
|
||||||
$$($1_EXTRA_DEPS)
|
|
||||||
$$(call MakeDir, $$(@D))
|
$$(call MakeDir, $$(@D))
|
||||||
$$(eval $$(call ListPathsSafely,$1_SRCS, $$@.tmp))
|
$$(eval $$(call ListPathsSafely,$1_SRCS, $$@.tmp))
|
||||||
$$(call LogWarn, Compiling $$(words $$($1_SRCS)) files for $1)
|
$$(call LogWarn, Compiling $$(words $$($1_SRCS)) files for $1)
|
||||||
$$(call ExecuteWithLog, $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$$($1_SAFE_NAME)_batch, \
|
$$(call ExecuteWithLog, $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$$($1_SAFE_NAME)_batch, \
|
||||||
$$($1_JVM) $$($1_JAVAC_CMD) $$($1_FLAGS) \
|
$$($1_JAVAC_CMD) $$($1_FLAGS) \
|
||||||
-implicit:none \
|
|
||||||
$$($1_API_DIGEST_FLAGS) \
|
$$($1_API_DIGEST_FLAGS) \
|
||||||
-d $$($1_BIN) $$($1_HEADERS_ARG) @$$@.tmp) && \
|
-d $$($1_BIN) $$($1_HEADERS_ARG) @$$@.tmp) && \
|
||||||
$(MV) $$@.tmp $$@
|
$(MV) $$@.tmp $$@
|
||||||
endif
|
|
||||||
|
|
||||||
# Add all targets to main variable
|
# Add all targets to main variable
|
||||||
$1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_COMPILE_TARGET) \
|
$1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_COMPILE_TARGET) \
|
||||||
@ -506,7 +459,6 @@ define SetupJavaCompilationBody
|
|||||||
EXTRA_MANIFEST_ATTR:=$$($1_EXTRA_MANIFEST_ATTR), \
|
EXTRA_MANIFEST_ATTR:=$$($1_EXTRA_MANIFEST_ATTR), \
|
||||||
JARINDEX:=$$($1_JARINDEX), \
|
JARINDEX:=$$($1_JARINDEX), \
|
||||||
HEADERS:=$$($1_HEADERS), \
|
HEADERS:=$$($1_HEADERS), \
|
||||||
SETUP:=$$($1_SETUP), \
|
|
||||||
))
|
))
|
||||||
|
|
||||||
# Add jar to target list
|
# Add jar to target list
|
||||||
|
@ -1,104 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
||||||
#
|
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
|
||||||
# under the terms of the GNU General Public License version 2 only, as
|
|
||||||
# published by the Free Software Foundation. Oracle designates this
|
|
||||||
# particular file as subject to the "Classpath" exception as provided
|
|
||||||
# by Oracle in the LICENSE file that accompanied this code.
|
|
||||||
#
|
|
||||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
# version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
# accompanied this code).
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License version
|
|
||||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
#
|
|
||||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
# or visit www.oracle.com if you need additional information or have any
|
|
||||||
# questions.
|
|
||||||
#
|
|
||||||
|
|
||||||
ifndef _SETUP_GMK
|
|
||||||
_SETUP_GMK := 1
|
|
||||||
|
|
||||||
# Include custom extension hook
|
|
||||||
$(eval $(call IncludeCustomExtension, common/SetupJavaCompilers.gmk))
|
|
||||||
|
|
||||||
include JavaCompilation.gmk
|
|
||||||
|
|
||||||
JDK_SOURCE_TARGET_FLAGS := -source $(JDK_SOURCE_TARGET_VERSION) \
|
|
||||||
-target $(JDK_SOURCE_TARGET_VERSION)
|
|
||||||
|
|
||||||
# If warnings needs to be non-fatal for testing purposes use a command like:
|
|
||||||
# make JAVAC_WARNINGS="-Xlint:all -Xmaxwarns 10000"
|
|
||||||
JAVAC_WARNINGS ?= -Xlint:all -Werror
|
|
||||||
|
|
||||||
# The BOOT_JAVAC setup uses the boot jdk compiler to compile the tools
|
|
||||||
# and the interim javac, to be run by the boot jdk.
|
|
||||||
$(eval $(call SetupJavaCompiler,BOOT_JAVAC, \
|
|
||||||
JAVAC := $(JAVAC), \
|
|
||||||
FLAGS := \
|
|
||||||
$(JAVA_TOOL_FLAGS_SMALL) \
|
|
||||||
$(BOOT_JDK_SOURCETARGET) \
|
|
||||||
-XDignore.symbol.file=true -g \
|
|
||||||
$(JAVAC_WARNINGS) -Xlint:-options, \
|
|
||||||
DISABLE_SJAVAC := true, \
|
|
||||||
))
|
|
||||||
|
|
||||||
# Any java code executed during a JDK build to build other parts of the JDK must be
|
|
||||||
# executed by the bootstrap JDK (probably with -Xbootclasspath/p: ) and for this
|
|
||||||
# purpose must be built with -target PREVIOUS for bootstrapping purposes, which
|
|
||||||
# requires restricting to language level and api of previous JDK.
|
|
||||||
#
|
|
||||||
# The generate old bytecode javac setup uses the new compiler to compile for the
|
|
||||||
# boot jdk to generate tools that need to be run with the boot jdk.
|
|
||||||
# Thus we force the target bytecode to the previous JDK version.
|
|
||||||
# Add -Xlint:-options to avoid the warning about not setting -bootclasspath. Since
|
|
||||||
# it's running on the boot jdk, the default bootclasspath is correct.
|
|
||||||
$(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE, \
|
|
||||||
JVM := $(JAVA_SMALL), \
|
|
||||||
JAVAC := $(NEW_JAVAC), \
|
|
||||||
FLAGS := $(BOOT_JDK_SOURCETARGET) -XDignore.symbol.file=true -XDstringConcat=inline \
|
|
||||||
$(JAVAC_WARNINGS) -Xlint:-options, \
|
|
||||||
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
|
||||||
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, \
|
|
||||||
JVM := $(JAVA_JAVAC), \
|
|
||||||
JAVAC := $(NEW_JAVAC), \
|
|
||||||
FLAGS := $(JDK_SOURCE_TARGET_FLAGS) --doclint-format html5 \
|
|
||||||
-encoding ascii -XDignore.symbol.file=true $(JAVAC_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
|
|
||||||
# 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
|
|
||||||
# (it will be in "make images") therefore we use classes instead.
|
|
||||||
$(eval $(call SetupJavaCompiler,GENERATE_USINGJDKBYTECODE, \
|
|
||||||
JVM := $(JAVA_SMALL), \
|
|
||||||
JAVAC := $(NEW_JAVAC), \
|
|
||||||
FLAGS := --upgrade-module-path $(JDK_OUTPUTDIR)/modules --system none \
|
|
||||||
$(JAVAC_WARNINGS), \
|
|
||||||
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
|
||||||
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
|
|
||||||
|
|
||||||
# Use boot javac to generate JDK 8 compatible class files explicitly
|
|
||||||
$(eval $(call SetupJavaCompiler,GENERATE_8_BYTECODE, \
|
|
||||||
JAVAC := $(JAVAC), \
|
|
||||||
FLAGS := \
|
|
||||||
$(JAVA_TOOL_FLAGS_SMALL) \
|
|
||||||
--release 8 \
|
|
||||||
-XDignore.symbol.file=true -g \
|
|
||||||
$(JAVAC_WARNINGS), \
|
|
||||||
DISABLE_SJAVAC := true, \
|
|
||||||
))
|
|
||||||
|
|
||||||
endif # _SETUP_GMK
|
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2015, 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
|
||||||
@ -26,7 +26,6 @@
|
|||||||
include JarArchive.gmk
|
include JarArchive.gmk
|
||||||
include JavaCompilation.gmk
|
include JavaCompilation.gmk
|
||||||
include Modules.gmk
|
include Modules.gmk
|
||||||
include SetupJavaCompilers.gmk
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
@ -53,12 +52,14 @@ COMPILECREATESYMBOLS_ADD_EXPORTS := \
|
|||||||
#
|
#
|
||||||
|
|
||||||
$(eval $(call SetupJavaCompilation, COMPILE_CREATE_SYMBOLS, \
|
$(eval $(call SetupJavaCompilation, COMPILE_CREATE_SYMBOLS, \
|
||||||
SETUP := GENERATE_OLDBYTECODE, \
|
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
|
||||||
SRC := $(TOPDIR)/make/langtools/src/classes \
|
SRC := $(TOPDIR)/make/langtools/src/classes \
|
||||||
$(TOPDIR)/src/jdk.jdeps/share/classes, \
|
$(TOPDIR)/src/jdk.jdeps/share/classes, \
|
||||||
INCLUDES := build/tools/symbolgenerator com/sun/tools/classfile, \
|
INCLUDES := build/tools/symbolgenerator com/sun/tools/classfile, \
|
||||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/create_symbols, \
|
BIN := $(BUILDTOOLS_OUTPUTDIR)/create_symbols, \
|
||||||
ADD_JAVAC_FLAGS := $(INTERIM_LANGTOOLS_ARGS) \
|
DISABLED_WARNINGS := options, \
|
||||||
|
JAVAC_FLAGS := \
|
||||||
|
$(INTERIM_LANGTOOLS_ARGS) \
|
||||||
--patch-module java.base=$(BUILDTOOLS_OUTPUTDIR)/gensrc/java.base.interim \
|
--patch-module java.base=$(BUILDTOOLS_OUTPUTDIR)/gensrc/java.base.interim \
|
||||||
$(COMPILECREATESYMBOLS_ADD_EXPORTS), \
|
$(COMPILECREATESYMBOLS_ADD_EXPORTS), \
|
||||||
))
|
))
|
||||||
|
@ -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
|
||||||
@ -44,21 +44,25 @@ TEXT_SOURCES := $(TEXT_PKG)/BreakIteratorRules.java \
|
|||||||
BREAK_ITERATOR_CLASSES := $(BUILDTOOLS_OUTPUTDIR)/break_iterator_classes
|
BREAK_ITERATOR_CLASSES := $(BUILDTOOLS_OUTPUTDIR)/break_iterator_classes
|
||||||
|
|
||||||
# These two files should be moved out to a build tool!
|
# These two files should be moved out to a build tool!
|
||||||
$(eval $(call SetupJavaCompilation,BUILD_BREAKITERATOR_BASE, \
|
$(eval $(call SetupJavaCompilation, BUILD_BREAKITERATOR_BASE, \
|
||||||
SETUP := GENERATE_OLDBYTECODE, \
|
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
|
||||||
SRC := $(TOPDIR)/src/java.base/share/classes, \
|
SRC := $(TOPDIR)/src/java.base/share/classes, \
|
||||||
INCLUDE_FILES := \
|
INCLUDE_FILES := \
|
||||||
$(TEXT_PKG)/BreakIteratorRules.java \
|
$(TEXT_PKG)/BreakIteratorRules.java \
|
||||||
$(TEXT_PKG)/BreakIteratorInfo.java, \
|
$(TEXT_PKG)/BreakIteratorInfo.java, \
|
||||||
BIN := $(BREAK_ITERATOR_CLASSES)/java.base))
|
BIN := $(BREAK_ITERATOR_CLASSES)/java.base, \
|
||||||
|
DISABLED_WARNINGS := options, \
|
||||||
|
))
|
||||||
|
|
||||||
$(eval $(call SetupJavaCompilation,BUILD_BREAKITERATOR_LD, \
|
$(eval $(call SetupJavaCompilation, BUILD_BREAKITERATOR_LD, \
|
||||||
SETUP := GENERATE_OLDBYTECODE, \
|
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
|
||||||
SRC := $(TOPDIR)/src/jdk.localedata/share/classes, \
|
SRC := $(TOPDIR)/src/jdk.localedata/share/classes, \
|
||||||
INCLUDE_FILES := \
|
INCLUDE_FILES := \
|
||||||
$(TEXT_PKG_LD)/BreakIteratorRules_th.java \
|
$(TEXT_PKG_LD)/BreakIteratorRules_th.java \
|
||||||
$(TEXT_PKG_LD)/BreakIteratorInfo_th.java, \
|
$(TEXT_PKG_LD)/BreakIteratorInfo_th.java, \
|
||||||
BIN := $(BREAK_ITERATOR_CLASSES)/jdk.localedata))
|
BIN := $(BREAK_ITERATOR_CLASSES)/jdk.localedata, \
|
||||||
|
DISABLED_WARNINGS := options, \
|
||||||
|
))
|
||||||
|
|
||||||
BREAK_ITERATOR_BOOTCLASSPATH := \
|
BREAK_ITERATOR_BOOTCLASSPATH := \
|
||||||
--patch-module java.base=$(BREAK_ITERATOR_CLASSES)/java.base \
|
--patch-module java.base=$(BREAK_ITERATOR_CLASSES)/java.base \
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2011, 2014, 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
|
||||||
@ -24,7 +24,5 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
include JavaCompilation.gmk
|
include JavaCompilation.gmk
|
||||||
include SetupJavaCompilers.gmk
|
|
||||||
# We need the tools.
|
|
||||||
include ToolsJdk.gmk
|
include ToolsJdk.gmk
|
||||||
|
|
||||||
|
@ -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,6 +31,4 @@ include Execute.gmk
|
|||||||
include JavaCompilation.gmk
|
include JavaCompilation.gmk
|
||||||
include NativeCompilation.gmk
|
include NativeCompilation.gmk
|
||||||
include TextFileProcessing.gmk
|
include TextFileProcessing.gmk
|
||||||
include SetupJavaCompilers.gmk
|
|
||||||
# We need the tools.
|
|
||||||
include ToolsJdk.gmk
|
include ToolsJdk.gmk
|
||||||
|
@ -29,16 +29,9 @@
|
|||||||
JFR_TOOLS_SRCDIR := $(TOPDIR)/make/src/classes
|
JFR_TOOLS_SRCDIR := $(TOPDIR)/make/src/classes
|
||||||
JFR_TOOLS_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/buildtools/tools_classes
|
JFR_TOOLS_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/buildtools/tools_classes
|
||||||
|
|
||||||
$(eval $(call SetupJavaCompiler, GENERATE_JFRBYTECODE, \
|
|
||||||
JAVAC := $(JAVAC), \
|
|
||||||
FLAGS := -Xlint:all -Werror, \
|
|
||||||
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
|
||||||
SERVER_JVM := $(SJAVAC_SERVER_JAVA), \
|
|
||||||
DISABLE_SJAVAC := true, \
|
|
||||||
))
|
|
||||||
|
|
||||||
$(eval $(call SetupJavaCompilation, BUILD_JFR_TOOLS, \
|
$(eval $(call SetupJavaCompilation, BUILD_JFR_TOOLS, \
|
||||||
SETUP := GENERATE_JFRBYTECODE, \
|
COMPILER := bootjdk, \
|
||||||
|
SMALL_JAVA := false, \
|
||||||
SRC := $(JFR_TOOLS_SRCDIR), \
|
SRC := $(JFR_TOOLS_SRCDIR), \
|
||||||
BIN := $(JFR_TOOLS_OUTPUTDIR), \
|
BIN := $(JFR_TOOLS_OUTPUTDIR), \
|
||||||
DISABLED_WARNINGS := try, \
|
DISABLED_WARNINGS := try, \
|
||||||
|
@ -32,16 +32,9 @@ $(eval $(call IncludeCustomExtension, hotspot/gensrc/GensrcJvmti.gmk))
|
|||||||
JVMTI_TOOLS_SRCDIR := $(TOPDIR)/src/hotspot/share/prims
|
JVMTI_TOOLS_SRCDIR := $(TOPDIR)/src/hotspot/share/prims
|
||||||
JVMTI_TOOLS_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/tools/jvmti
|
JVMTI_TOOLS_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/tools/jvmti
|
||||||
|
|
||||||
$(eval $(call SetupJavaCompiler, GENERATE_OLDBYTECODE, \
|
|
||||||
JAVAC := $(JAVAC), \
|
|
||||||
FLAGS := -Xlint:all -Werror, \
|
|
||||||
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
|
||||||
SERVER_JVM := $(SJAVAC_SERVER_JAVA), \
|
|
||||||
DISABLE_SJAVAC := true, \
|
|
||||||
))
|
|
||||||
|
|
||||||
$(eval $(call SetupJavaCompilation, BUILD_JVMTI_TOOLS, \
|
$(eval $(call SetupJavaCompilation, BUILD_JVMTI_TOOLS, \
|
||||||
SETUP := GENERATE_OLDBYTECODE, \
|
COMPILER := bootjdk, \
|
||||||
|
SMALL_JAVA := false, \
|
||||||
SRC := $(JVMTI_TOOLS_SRCDIR), \
|
SRC := $(JVMTI_TOOLS_SRCDIR), \
|
||||||
DISABLED_WARNINGS := rawtypes cast, \
|
DISABLED_WARNINGS := rawtypes cast, \
|
||||||
INCLUDE_FILES := jvmtiGen.java jvmtiEnvFill.java, \
|
INCLUDE_FILES := jvmtiGen.java jvmtiEnvFill.java, \
|
||||||
|
@ -29,7 +29,6 @@ default: all
|
|||||||
include $(SPEC)
|
include $(SPEC)
|
||||||
include MakeBase.gmk
|
include MakeBase.gmk
|
||||||
include JavaCompilation.gmk
|
include JavaCompilation.gmk
|
||||||
include SetupJavaCompilers.gmk
|
|
||||||
include Execute.gmk
|
include Execute.gmk
|
||||||
|
|
||||||
ifeq ($(call isTargetOs, windows), true)
|
ifeq ($(call isTargetOs, windows), true)
|
||||||
@ -97,10 +96,11 @@ ifeq ($(call isTargetOs, windows), true)
|
|||||||
TOOLS_OUTPUTDIR := $(HOTSPOT_OUTPUTDIR)/support/tools_classes
|
TOOLS_OUTPUTDIR := $(HOTSPOT_OUTPUTDIR)/support/tools_classes
|
||||||
|
|
||||||
$(eval $(call SetupJavaCompilation, BUILD_PROJECT_CREATOR, \
|
$(eval $(call SetupJavaCompilation, BUILD_PROJECT_CREATOR, \
|
||||||
SETUP := GENERATE_OLDBYTECODE, \
|
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
|
||||||
DISABLED_WARNINGS := auxiliaryclass deprecation rawtypes unchecked cast, \
|
DISABLED_WARNINGS := auxiliaryclass deprecation rawtypes unchecked cast options, \
|
||||||
SRC := $(TOPDIR)/make/hotspot/src/classes, \
|
SRC := $(TOPDIR)/make/hotspot/src/classes, \
|
||||||
BIN := $(TOOLS_OUTPUTDIR), \
|
BIN := $(TOOLS_OUTPUTDIR), \
|
||||||
|
JAVAC_FLAGS := -XDstringConcat=inline, \
|
||||||
))
|
))
|
||||||
|
|
||||||
TARGETS += $(BUILD_PROJECT_CREATOR)
|
TARGETS += $(BUILD_PROJECT_CREATOR)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2011, 2017, 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
|
||||||
@ -35,13 +35,3 @@ $(eval $(call SetupBuildLauncher, serialver, \
|
|||||||
MAIN_CLASS := sun.tools.serialver.SerialVer, \
|
MAIN_CLASS := sun.tools.serialver.SerialVer, \
|
||||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
||||||
))
|
))
|
||||||
|
|
||||||
ifeq ($(ENABLE_SJAVAC), yes)
|
|
||||||
# Build sjavac directly to the exploded image so that it does not get included
|
|
||||||
# into any real images
|
|
||||||
$(eval $(call SetupBuildLauncher, sjavac, \
|
|
||||||
MAIN_CLASS := com.sun.tools.sjavac.Main, \
|
|
||||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS, \
|
|
||||||
OUTPUT_DIR := $(JDK_OUTPUTDIR)/bin, \
|
|
||||||
))
|
|
||||||
endif
|
|
||||||
|
@ -28,7 +28,6 @@ default: build
|
|||||||
include $(SPEC)
|
include $(SPEC)
|
||||||
include MakeBase.gmk
|
include MakeBase.gmk
|
||||||
include JavaCompilation.gmk
|
include JavaCompilation.gmk
|
||||||
include SetupJavaCompilers.gmk
|
|
||||||
include NativeCompilation.gmk
|
include NativeCompilation.gmk
|
||||||
|
|
||||||
TARGETS :=
|
TARGETS :=
|
||||||
@ -49,13 +48,14 @@ TOOLS_JAR := $(wildcard $(BOOT_JDK)/lib/tools.jar)
|
|||||||
FH_CLASSPATH := $(call PathList, $(JTREG_JAR) $(TOOLS_JAR))
|
FH_CLASSPATH := $(call PathList, $(JTREG_JAR) $(TOOLS_JAR))
|
||||||
|
|
||||||
$(eval $(call SetupJavaCompilation, BUILD_FAILURE_HANDLER, \
|
$(eval $(call SetupJavaCompilation, BUILD_FAILURE_HANDLER, \
|
||||||
SETUP := GENERATE_OLDBYTECODE, \
|
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
|
||||||
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 := serial try, \
|
DISABLED_WARNINGS := options serial try, \
|
||||||
COPY := .properties, \
|
COPY := .properties, \
|
||||||
CLASSPATH := $(JTREG_JAR) $(TOOLS_JAR), \
|
CLASSPATH := $(JTREG_JAR) $(TOOLS_JAR), \
|
||||||
JAR := $(FH_JAR), \
|
JAR := $(FH_JAR), \
|
||||||
|
JAVAC_FLAGS := -XDstringConcat=inline, \
|
||||||
))
|
))
|
||||||
|
|
||||||
TARGETS += $(BUILD_FAILURE_HANDLER)
|
TARGETS += $(BUILD_FAILURE_HANDLER)
|
||||||
|
@ -29,7 +29,6 @@ default: all
|
|||||||
include $(SPEC)
|
include $(SPEC)
|
||||||
include MakeBase.gmk
|
include MakeBase.gmk
|
||||||
include JavaCompilation.gmk
|
include JavaCompilation.gmk
|
||||||
include SetupJavaCompilers.gmk
|
|
||||||
include TestFilesCompilation.gmk
|
include TestFilesCompilation.gmk
|
||||||
|
|
||||||
ifeq ($(JMH_CORE_JAR), )
|
ifeq ($(JMH_CORE_JAR), )
|
||||||
@ -74,34 +73,27 @@ MICROBENCHMARK_MANIFEST := Build: $(FULL_VERSION)\n\
|
|||||||
#### Compile Indify tool
|
#### Compile Indify tool
|
||||||
|
|
||||||
$(eval $(call SetupJavaCompilation, BUILD_INDIFY, \
|
$(eval $(call SetupJavaCompilation, BUILD_INDIFY, \
|
||||||
SETUP := GENERATE_OLDBYTECODE, \
|
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
|
||||||
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 serial, \
|
DISABLED_WARNINGS := rawtypes serial options, \
|
||||||
BIN := $(MICROBENCHMARK_TOOLS_CLASSES), \
|
BIN := $(MICROBENCHMARK_TOOLS_CLASSES), \
|
||||||
|
JAVAC_FLAGS := -XDstringConcat=inline -Xprefer:newer, \
|
||||||
))
|
))
|
||||||
|
|
||||||
#### Compile Targets
|
#### Compile Targets
|
||||||
|
|
||||||
# Building microbenchmark requires the jdk.unsupported and java.management modules,
|
# Building microbenchmark requires the jdk.unsupported and java.management modules.
|
||||||
# and to have sjavac disabled.
|
|
||||||
$(eval $(call SetupJavaCompiler, MICROBENCHMARK_JAVA_COMPILER, \
|
|
||||||
JVM := $(JAVA) --add-modules jdk.unsupported --limit-modules java.management, \
|
|
||||||
JAVAC := $(NEW_JAVAC), \
|
|
||||||
DISABLE_SJAVAC := true, \
|
|
||||||
FLAGS := --upgrade-module-path $(JDK_OUTPUTDIR)/modules --system none \
|
|
||||||
-Xlint:all -Werror, \
|
|
||||||
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
|
||||||
SERVER_JVM := $(SJAVAC_SERVER_JAVA), \
|
|
||||||
))
|
|
||||||
|
|
||||||
# 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, \
|
TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK_UPGRADED), \
|
||||||
ADD_JAVAC_FLAGS := -cp $(MICROBENCHMARK_CLASSPATH), \
|
SMALL_JAVA := false, \
|
||||||
|
CLASSPATH := $(MICROBENCHMARK_CLASSPATH), \
|
||||||
DISABLED_WARNINGS := processing rawtypes cast serial, \
|
DISABLED_WARNINGS := processing rawtypes cast serial, \
|
||||||
SRC := $(MICROBENCHMARK_SRC), \
|
SRC := $(MICROBENCHMARK_SRC), \
|
||||||
BIN := $(MICROBENCHMARK_CLASSES), \
|
BIN := $(MICROBENCHMARK_CLASSES), \
|
||||||
|
JAVA_FLAGS := --add-modules jdk.unsupported --limit-modules java.management, \
|
||||||
))
|
))
|
||||||
|
|
||||||
$(BUILD_JDK_MICROBENCHMARK): $(JMH_COMPILE_JARS)
|
$(BUILD_JDK_MICROBENCHMARK): $(JMH_COMPILE_JARS)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2015, 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
|
||||||
@ -28,7 +28,6 @@ default: all
|
|||||||
include $(SPEC)
|
include $(SPEC)
|
||||||
include MakeBase.gmk
|
include MakeBase.gmk
|
||||||
include JavaCompilation.gmk
|
include JavaCompilation.gmk
|
||||||
include SetupJavaCompilers.gmk
|
|
||||||
|
|
||||||
TARGETS :=
|
TARGETS :=
|
||||||
|
|
||||||
@ -36,18 +35,17 @@ TEST_LIB_SOURCE_DIR := $(TOPDIR)/test/lib
|
|||||||
TEST_LIB_SUPPORT := $(SUPPORT_OUTPUTDIR)/test/lib
|
TEST_LIB_SUPPORT := $(SUPPORT_OUTPUTDIR)/test/lib
|
||||||
|
|
||||||
$(eval $(call SetupJavaCompilation, BUILD_WB_JAR, \
|
$(eval $(call SetupJavaCompilation, BUILD_WB_JAR, \
|
||||||
SETUP := GENERATE_USINGJDKBYTECODE, \
|
TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK_UPGRADED), \
|
||||||
SRC := $(TEST_LIB_SOURCE_DIR)/sun, \
|
SRC := $(TEST_LIB_SOURCE_DIR)/sun, \
|
||||||
BIN := $(TEST_LIB_SUPPORT)/wb_classes, \
|
BIN := $(TEST_LIB_SUPPORT)/wb_classes, \
|
||||||
JAR := $(TEST_LIB_SUPPORT)/wb.jar, \
|
JAR := $(TEST_LIB_SUPPORT)/wb.jar, \
|
||||||
ADD_JAVAC_FLAGS := $(JAVAC_WARNINGS), \
|
|
||||||
))
|
))
|
||||||
|
|
||||||
TARGETS += $(BUILD_WB_JAR)
|
TARGETS += $(BUILD_WB_JAR)
|
||||||
|
|
||||||
# test-lib.jar will contain only hprof classes until JDK-8081381 is resolved
|
# test-lib.jar will contain only hprof classes until JDK-8081381 is resolved
|
||||||
$(eval $(call SetupJavaCompilation, BUILD_TEST_LIB_JAR, \
|
$(eval $(call SetupJavaCompilation, BUILD_TEST_LIB_JAR, \
|
||||||
SETUP := GENERATE_USINGJDKBYTECODE, \
|
TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK_UPGRADED), \
|
||||||
SRC := $(TEST_LIB_SOURCE_DIR)/jdk/test/lib/hprof, \
|
SRC := $(TEST_LIB_SOURCE_DIR)/jdk/test/lib/hprof, \
|
||||||
BIN := $(TEST_LIB_SUPPORT)/test-lib_classes, \
|
BIN := $(TEST_LIB_SUPPORT)/test-lib_classes, \
|
||||||
JAR := $(TEST_LIB_SUPPORT)/test-lib.jar, \
|
JAR := $(TEST_LIB_SUPPORT)/test-lib.jar, \
|
||||||
|
@ -33,7 +33,7 @@ default: all
|
|||||||
|
|
||||||
include $(SPEC)
|
include $(SPEC)
|
||||||
include MakeBase.gmk
|
include MakeBase.gmk
|
||||||
include SetupJavaCompilers.gmk
|
include JavaCompilation.gmk
|
||||||
|
|
||||||
TARGETS_BUILD :=
|
TARGETS_BUILD :=
|
||||||
TARGETS_IMAGE :=
|
TARGETS_IMAGE :=
|
||||||
@ -65,6 +65,8 @@ ifeq ($(INCLUDE_GRAAL), true)
|
|||||||
--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 \
|
||||||
--add-exports java.base/jdk.internal.module=ALL-UNNAMED \
|
--add-exports java.base/jdk.internal.module=ALL-UNNAMED \
|
||||||
|
-Xprefer:newer \
|
||||||
|
#
|
||||||
|
|
||||||
### Copy 3rd party libs
|
### Copy 3rd party libs
|
||||||
$(eval $(call SetupCopyFiles, COPY_GRAALUNIT_LIBS, \
|
$(eval $(call SetupCopyFiles, COPY_GRAALUNIT_LIBS, \
|
||||||
@ -76,7 +78,7 @@ ifeq ($(INCLUDE_GRAAL), true)
|
|||||||
|
|
||||||
### Compile graalunit tests
|
### Compile graalunit tests
|
||||||
$(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_TESTS, \
|
$(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_TESTS, \
|
||||||
SETUP := GENERATE_USINGJDKBYTECODE, \
|
TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK_UPGRADED), \
|
||||||
SRC := \
|
SRC := \
|
||||||
$(SRC_DIR)/jdk.internal.vm.compiler.collections.test/src \
|
$(SRC_DIR)/jdk.internal.vm.compiler.collections.test/src \
|
||||||
$(SRC_DIR)/org.graalvm.compiler.api.directives.test/src \
|
$(SRC_DIR)/org.graalvm.compiler.api.directives.test/src \
|
||||||
@ -115,7 +117,7 @@ ifeq ($(INCLUDE_GRAAL), true)
|
|||||||
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, \
|
DISABLED_WARNINGS := processing, \
|
||||||
ADD_JAVAC_FLAGS := $(TEST_JAVAC_FLAGS), \
|
JAVAC_FLAGS := $(TEST_JAVAC_FLAGS), \
|
||||||
COPY := .input, \
|
COPY := .input, \
|
||||||
))
|
))
|
||||||
|
|
||||||
@ -123,20 +125,16 @@ ifeq ($(INCLUDE_GRAAL), true)
|
|||||||
|
|
||||||
### Compile graalunit tests which require -XDstringConcat=inline
|
### Compile graalunit tests which require -XDstringConcat=inline
|
||||||
$(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_TESTS_SET2, \
|
$(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_TESTS_SET2, \
|
||||||
SETUP := GENERATE_USINGJDKBYTECODE, \
|
TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK_UPGRADED), \
|
||||||
DEPENDS := $(BUILD_VM_COMPILER_TESTS), \
|
DEPENDS := $(BUILD_VM_COMPILER_TESTS), \
|
||||||
SRC := $(SRC_DIR)/org.graalvm.compiler.core.test/src, \
|
SRC := $(SRC_DIR)/org.graalvm.compiler.core.test/src, \
|
||||||
INCLUDE_FILES := org/graalvm/compiler/core/test/VerifyDebugUsageTest.java, \
|
INCLUDE_FILES := org/graalvm/compiler/core/test/VerifyDebugUsageTest.java, \
|
||||||
BIN := $(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests, \
|
BIN := $(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests, \
|
||||||
CLASSPATH := \
|
CLASSPATH := \
|
||||||
$(TEST_COMPILE_CP) \
|
$(TEST_COMPILE_CP) \
|
||||||
$(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests \
|
$(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests, \
|
||||||
, \
|
|
||||||
DISABLED_WARNINGS := processing, \
|
DISABLED_WARNINGS := processing, \
|
||||||
ADD_JAVAC_FLAGS := \
|
JAVAC_FLAGS := $(TEST_JAVAC_FLAGS) -XDstringConcat=inline, \
|
||||||
$(TEST_JAVAC_FLAGS) \
|
|
||||||
-XDstringConcat=inline \
|
|
||||||
, \
|
|
||||||
))
|
))
|
||||||
|
|
||||||
TARGETS_BUILD += $(BUILD_VM_COMPILER_TESTS_SET2)
|
TARGETS_BUILD += $(BUILD_VM_COMPILER_TESTS_SET2)
|
||||||
@ -153,7 +151,7 @@ ifeq ($(INCLUDE_GRAAL), true)
|
|||||||
|
|
||||||
### Compile and build mxtool
|
### Compile and build mxtool
|
||||||
$(eval $(call SetupJavaCompilation, BUILD_MXTOOL, \
|
$(eval $(call SetupJavaCompilation, BUILD_MXTOOL, \
|
||||||
SETUP := GENERATE_USINGJDKBYTECODE, \
|
TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK_UPGRADED), \
|
||||||
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, \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user