Skip to content

Commit f242cb5

Browse files
committed
8273797: Stop impersonating "server" VM in all VM variants
Reviewed-by: dholmes, erikj, ihse
1 parent 240fa6e commit f242cb5

File tree

5 files changed

+8
-38
lines changed

5 files changed

+8
-38
lines changed

make/autoconf/flags-ldflags.m4

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,10 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS],
3232
3333
# Setup the target toolchain
3434
35+
# The target dir matches the name of VM variant
36+
TARGET_JVM_VARIANT_PATH=$JVM_VARIANT_MAIN
37+
3538
# On some platforms (mac) the linker warns about non existing -L dirs.
36-
# For any of the variants server, client, minimal or zero, the dir matches the
37-
# variant name. The "main" variant should be used for linking. For the
38-
# rest, the dir is just server.
39-
if HOTSPOT_CHECK_JVM_VARIANT(server) || HOTSPOT_CHECK_JVM_VARIANT(client) \
40-
|| HOTSPOT_CHECK_JVM_VARIANT(minimal) || HOTSPOT_CHECK_JVM_VARIANT(zero); then
41-
TARGET_JVM_VARIANT_PATH=$JVM_VARIANT_MAIN
42-
else
43-
TARGET_JVM_VARIANT_PATH=server
44-
fi
4539
FLAGS_SETUP_LDFLAGS_CPU_DEP([TARGET])
4640
4741
# Setup the build toolchain

make/autoconf/hotspot.m4

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,6 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_VARIANTS],
8383
AC_MSG_ERROR([Cannot continue])
8484
fi
8585
86-
# All "special" variants share the same output directory ("server")
87-
VALID_MULTIPLE_JVM_VARIANTS="server client minimal zero"
88-
UTIL_GET_NON_MATCHING_VALUES(INVALID_MULTIPLE_VARIANTS, $JVM_VARIANTS, \
89-
$VALID_MULTIPLE_JVM_VARIANTS)
90-
if test "x$INVALID_MULTIPLE_VARIANTS" != x && \
91-
test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
92-
AC_MSG_ERROR([You can only build multiple variants using these variants: '$VALID_MULTIPLE_JVM_VARIANTS'])
93-
fi
94-
9586
# The "main" variant is the one used by other libs to link against during the
9687
# build.
9788
if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then

make/hotspot/HotspotCommon.gmk

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,7 @@ JVM_SUPPORT_DIR := $(JVM_VARIANT_OUTPUTDIR)/support
3434
DTRACE_SUPPORT_DIR := $(JVM_SUPPORT_DIR)/dtrace
3535

3636
LIB_OUTPUTDIR := $(call FindLibDirForModule, java.base)
37-
ifneq ($(filter client minimal zero, $(JVM_VARIANT)), )
38-
JVM_VARIANT_SUBDIR := $(JVM_VARIANT)
39-
else
40-
# Use 'server' as default target directory name for all other variants.
41-
JVM_VARIANT_SUBDIR := server
42-
endif
43-
JVM_LIB_OUTPUTDIR := $(LIB_OUTPUTDIR)/$(JVM_VARIANT_SUBDIR)
37+
JVM_LIB_OUTPUTDIR := $(LIB_OUTPUTDIR)/$(JVM_VARIANT)
4438

4539
################################################################################
4640

make/modules/java.base/Copy.gmk

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,10 @@ ifeq ($(call And, $(call isTargetOs, windows) $(call isTargetCpu, x86)), true)
9595
endif
9696
DEFAULT_CFG_VARIANT ?= server
9797

98-
# Any variant other than server, client, minimal, or zero is represented as server in
99-
# the cfg file.
100-
VALID_CFG_VARIANTS := server client minimal zero
101-
CFG_VARIANTS := $(filter $(VALID_CFG_VARIANTS), $(JVM_VARIANTS)) \
102-
$(if $(filter-out $(VALID_CFG_VARIANTS), $(JVM_VARIANTS)), server)
103-
10498
# Change the order to put the default variant first if present.
10599
ORDERED_CFG_VARIANTS := \
106-
$(if $(filter $(DEFAULT_CFG_VARIANT), $(CFG_VARIANTS)), $(DEFAULT_CFG_VARIANT)) \
107-
$(filter-out $(DEFAULT_CFG_VARIANT), $(CFG_VARIANTS))
100+
$(if $(filter $(DEFAULT_CFG_VARIANT), $(JVM_VARIANTS)), $(DEFAULT_CFG_VARIANT)) \
101+
$(filter-out $(DEFAULT_CFG_VARIANT), $(JVM_VARIANTS))
108102

109103
JVMCFG := $(LIB_DST_DIR)/jvm.cfg
110104

make/modules/java.base/Lib.gmk

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,8 @@ ifeq ($(call isTargetOsType, unix), true)
156156
TARGETS += $(LIB_OUTPUTDIR)/$1/$(call SHARED_LIBRARY,jsig)
157157
endef
158158

159-
# The subdir is the same as the variant for client, minimal or zero, for all
160-
# others it's server.
161-
VARIANT_SUBDIRS := $(filter client minimal zero, $(JVM_VARIANTS)) \
162-
$(if $(filter-out client minimal zero, $(JVM_VARIANTS)), server)
163-
$(foreach v, $(VARIANT_SUBDIRS), $(eval $(call CreateSymlinks,$v)))
159+
# The subdir is the same as the variant
160+
$(foreach v, $(JVM_VARIANTS), $(eval $(call CreateSymlinks,$v)))
164161
endif
165162
############################################################################
166163

0 commit comments

Comments
 (0)