Skip to content

Commit 417ccc2

Browse files
committed
Split mixedrefs mode into static and dynamic
Signed-off-by: Sharon Wang <[email protected]>
1 parent 13bcbeb commit 417ccc2

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

closed/OpenJ9.gmk

+1
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ ifeq (true,$(OPENJ9_ENABLE_CMAKE))
341341
-DOPENJ9_BUILD=true \
342342
-DOPENJ9_SHA=$(OPENJ9_SHA) \
343343
-DOPENJDK_VERSION_NUMBER_FOUR_POSITIONS=$(VERSION_NUMBER_FOUR_POSITIONS) \
344+
-DOMR_MIXED_REFERENCES_MODE="$(OMR_MIXED_REFERENCES_MODE)"\
344345
#
345346

346347
ifeq (windows,$(OPENJDK_TARGET_OS))

closed/autoconf/custom-hook.m4

+10-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ AC_DEFUN([OPENJ9_CONFIGURE_CMAKE],
7878
7979
# Currently, mixedrefs mode is only available with CMake enabled
8080
if test "x$OPENJ9_ENABLE_MIXED_REFERENCES" = xtrue ; then
81-
AC_MSG_ERROR([--with-mixedrefs requires --with-cmake])
81+
AC_MSG_ERROR([--with-mixedrefs=[static|dynamic] requires --with-cmake])
8282
fi
8383
else
8484
OPENJ9_ENABLE_CMAKE=true
@@ -358,7 +358,14 @@ AC_DEFUN([OPENJ9_PLATFORM_SETUP],
358358
# Default OPENJ9_BUILD_OS=OPENJDK_BUILD_OS, but override with OpenJ9 equivalent as appropriate
359359
OPENJ9_BUILD_OS="${OPENJDK_BUILD_OS}"
360360
361-
if test "x$with_mixedrefs" = xyes ; then
361+
if test "x$with_mixedrefs" != x -a "x$with_mixedrefs" != xno; then
362+
if test "x$with_mixedrefs" = xyes -o "x$with_mixedrefs" = xstatic; then
363+
OMR_MIXED_REFERENCES_MODE=static
364+
elif test "x$with_mixedrefs" = xdynamic; then
365+
OMR_MIXED_REFERENCES_MODE=dynamic
366+
else
367+
AC_MSG_ERROR([OpenJ9 supports --with-mixedrefs=static and --with-mixedrefs=dynamic])
368+
fi
362369
OPENJ9_BUILD_MODE_ARCH="${OPENJ9_CPU}_mxdptrs"
363370
OPENJ9_ENABLE_MIXED_REFERENCES=true
364371
OPENJ9_LIBS_SUBDIR=default
@@ -423,6 +430,7 @@ AC_DEFUN([OPENJ9_PLATFORM_SETUP],
423430
AC_SUBST(COMPILER_VERSION_STRING)
424431
AC_SUBST(OPENJ9_LIBS_SUBDIR)
425432
AC_SUBST(OPENJ9_ENABLE_MIXED_REFERENCES)
433+
AC_SUBST(OMR_MIXED_REFERENCES_MODE)
426434
])
427435

428436
AC_DEFUN([OPENJ9_CHECK_NASM_VERSION],

closed/autoconf/custom-spec.gmk.in

+1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ OPENJ9_LIBS_SUBDIR := @OPENJ9_LIBS_SUBDIR@
8787

8888
# Mixed References Mode
8989
OPENJ9_ENABLE_MIXED_REFERENCES := @OPENJ9_ENABLE_MIXED_REFERENCES@
90+
OMR_MIXED_REFERENCES_MODE := @OMR_MIXED_REFERENCES_MODE@
9091

9192
# Export autoconf cache variables for CC/CXX.
9293
# This is for the case where ccache is enabled.

0 commit comments

Comments
 (0)