8273494: Zero: Put libjvm.so into "zero" folder, not "server"

Reviewed-by: ihse, sgehwolf
This commit is contained in:
Aleksey Shipilev 2021-09-15 08:56:53 +00:00
parent 92c30c941b
commit 8fbcc8239a
6 changed files with 11 additions and 14 deletions

View File

@ -33,11 +33,11 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS],
# Setup the target toolchain
# On some platforms (mac) the linker warns about non existing -L dirs.
# For any of the variants server, client or minimal, the dir matches the
# For any of the variants server, client, minimal or zero, the dir matches the
# variant name. The "main" variant should be used for linking. For the
# rest, the dir is just server.
if HOTSPOT_CHECK_JVM_VARIANT(server) || HOTSPOT_CHECK_JVM_VARIANT(client) \
|| HOTSPOT_CHECK_JVM_VARIANT(minimal); then
|| HOTSPOT_CHECK_JVM_VARIANT(minimal) || HOTSPOT_CHECK_JVM_VARIANT(zero); then
TARGET_JVM_VARIANT_PATH=$JVM_VARIANT_MAIN
else
TARGET_JVM_VARIANT_PATH=server

View File

@ -84,7 +84,7 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_VARIANTS],
fi
# All "special" variants share the same output directory ("server")
VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
VALID_MULTIPLE_JVM_VARIANTS="server client minimal zero"
UTIL_GET_NON_MATCHING_VALUES(INVALID_MULTIPLE_VARIANTS, $JVM_VARIANTS, \
$VALID_MULTIPLE_JVM_VARIANTS)
if test "x$INVALID_MULTIPLE_VARIANTS" != x && \
@ -95,7 +95,7 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_VARIANTS],
# The "main" variant is the one used by other libs to link against during the
# build.
if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
MAIN_VARIANT_PRIO_ORDER="server client minimal"
MAIN_VARIANT_PRIO_ORDER="server client minimal zero"
for variant in $MAIN_VARIANT_PRIO_ORDER; do
if HOTSPOT_CHECK_JVM_VARIANT($variant); then
JVM_VARIANT_MAIN="$variant"

View File

@ -34,7 +34,7 @@ JVM_SUPPORT_DIR := $(JVM_VARIANT_OUTPUTDIR)/support
DTRACE_SUPPORT_DIR := $(JVM_SUPPORT_DIR)/dtrace
LIB_OUTPUTDIR := $(call FindLibDirForModule, java.base)
ifneq ($(filter client minimal, $(JVM_VARIANT)), )
ifneq ($(filter client minimal zero, $(JVM_VARIANT)), )
JVM_VARIANT_SUBDIR := $(JVM_VARIANT)
else
# Use 'server' as default target directory name for all other variants.

View File

@ -95,9 +95,9 @@ ifeq ($(call And, $(call isTargetOs, windows) $(call isTargetCpu, x86)), true)
endif
DEFAULT_CFG_VARIANT ?= server
# Any variant other than server, client or minimal is represented as server in
# Any variant other than server, client, minimal, or zero is represented as server in
# the cfg file.
VALID_CFG_VARIANTS := server client minimal
VALID_CFG_VARIANTS := server client minimal zero
CFG_VARIANTS := $(filter $(VALID_CFG_VARIANTS), $(JVM_VARIANTS)) \
$(if $(filter-out $(VALID_CFG_VARIANTS), $(JVM_VARIANTS)), server)

View File

@ -156,10 +156,10 @@ ifeq ($(call isTargetOsType, unix), true)
TARGETS += $(LIB_OUTPUTDIR)/$1/$(call SHARED_LIBRARY,jsig)
endef
# The subdir is the same as the variant for client and minimal, for all
# The subdir is the same as the variant for client, minimal or zero, for all
# others it's server.
VARIANT_SUBDIRS := $(filter client minimal, $(JVM_VARIANTS)) \
$(if $(filter-out client minimal, $(JVM_VARIANTS)), server)
VARIANT_SUBDIRS := $(filter client minimal zero, $(JVM_VARIANTS)) \
$(if $(filter-out client minimal zero, $(JVM_VARIANTS)), server)
$(foreach v, $(VARIANT_SUBDIRS), $(eval $(call CreateSymlinks,$v)))
endif
############################################################################

View File

@ -365,10 +365,7 @@ public class Platform {
} else if (Platform.isMinimal()) {
return "minimal";
} else if (Platform.isZero()) {
// This name is used to search for libjvm.so. Weirdly, current
// build system puts libjvm.so into default location, which is
// "server". See JDK-8273494.
return "server";
return "zero";
} else {
throw new Error("TESTBUG: unsupported vm variant");
}