Skip to content
Permalink
Browse files
8273797: Stop impersonating "server" VM in all VM variants
Reviewed-by: dholmes, erikj, ihse
  • Loading branch information
shipilev committed Sep 21, 2021
1 parent 240fa6e commit f242cb5ce0af3bacf7af51351121f9137db92931
Showing 5 changed files with 8 additions and 38 deletions.
@@ -32,16 +32,10 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS],
# Setup the target toolchain
# The target dir matches the name of VM variant
TARGET_JVM_VARIANT_PATH=$JVM_VARIANT_MAIN
# On some platforms (mac) the linker warns about non existing -L dirs.
# 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) || HOTSPOT_CHECK_JVM_VARIANT(zero); then
TARGET_JVM_VARIANT_PATH=$JVM_VARIANT_MAIN
else
TARGET_JVM_VARIANT_PATH=server
fi
FLAGS_SETUP_LDFLAGS_CPU_DEP([TARGET])
# Setup the build toolchain
@@ -83,15 +83,6 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_VARIANTS],
AC_MSG_ERROR([Cannot continue])
fi
# All "special" variants share the same output directory ("server")
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 && \
test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
AC_MSG_ERROR([You can only build multiple variants using these variants: '$VALID_MULTIPLE_JVM_VARIANTS'])
fi
# 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
@@ -34,13 +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 zero, $(JVM_VARIANT)), )
JVM_VARIANT_SUBDIR := $(JVM_VARIANT)
else
# Use 'server' as default target directory name for all other variants.
JVM_VARIANT_SUBDIR := server
endif
JVM_LIB_OUTPUTDIR := $(LIB_OUTPUTDIR)/$(JVM_VARIANT_SUBDIR)
JVM_LIB_OUTPUTDIR := $(LIB_OUTPUTDIR)/$(JVM_VARIANT)

################################################################################

@@ -95,16 +95,10 @@ ifeq ($(call And, $(call isTargetOs, windows) $(call isTargetCpu, x86)), true)
endif
DEFAULT_CFG_VARIANT ?= server

# Any variant other than server, client, minimal, or zero is represented as server in
# the cfg file.
VALID_CFG_VARIANTS := server client minimal zero
CFG_VARIANTS := $(filter $(VALID_CFG_VARIANTS), $(JVM_VARIANTS)) \
$(if $(filter-out $(VALID_CFG_VARIANTS), $(JVM_VARIANTS)), server)

# Change the order to put the default variant first if present.
ORDERED_CFG_VARIANTS := \
$(if $(filter $(DEFAULT_CFG_VARIANT), $(CFG_VARIANTS)), $(DEFAULT_CFG_VARIANT)) \
$(filter-out $(DEFAULT_CFG_VARIANT), $(CFG_VARIANTS))
$(if $(filter $(DEFAULT_CFG_VARIANT), $(JVM_VARIANTS)), $(DEFAULT_CFG_VARIANT)) \
$(filter-out $(DEFAULT_CFG_VARIANT), $(JVM_VARIANTS))

JVMCFG := $(LIB_DST_DIR)/jvm.cfg

@@ -156,11 +156,8 @@ ifeq ($(call isTargetOsType, unix), true)
TARGETS += $(LIB_OUTPUTDIR)/$1/$(call SHARED_LIBRARY,jsig)
endef

# The subdir is the same as the variant for client, minimal or zero, for all
# others it's 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)))
# The subdir is the same as the variant
$(foreach v, $(JVM_VARIANTS), $(eval $(call CreateSymlinks,$v)))
endif
############################################################################

1 comment on commit f242cb5

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on f242cb5 Sep 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.