Skip to content

Commit

Permalink
Add configure support to enable RAM class persistence
Browse files Browse the repository at this point in the history
  • Loading branch information
ThanHenderson committed Oct 31, 2024
1 parent 7239a75 commit 67dfc43
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
13 changes: 13 additions & 0 deletions closed/OpenJ9.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,13 @@ else
FEATURE_SED_SCRIPT += $(call SedDisable,opt_jitserver)
endif

# Adjust snapshots enablement flags.
ifeq (true,$(OPENJ9_ENABLE_SNAPSHOTS))
FEATURE_SED_SCRIPT += $(call SedEnable,opt_snapshots)
else # OPENJ9_ENABLE_SNAPSHOTS
FEATURE_SED_SCRIPT += $(call SedDisable,opt_snapshots)
endif # OPENJ9_ENABLE_SNAPSHOTS

# Adjust Inline-Types enablement flags.
ifeq (true,$(OPENJ9_ENABLE_INLINE_TYPES))
SPEC_SED_SCRIPT += $(call SedEnable,opt_valhallaValueTypes)
Expand Down Expand Up @@ -463,6 +470,12 @@ ifeq (true,$(OPENJ9_ENABLE_CMAKE))
CMAKE_ARGS += -DJ9VM_OPT_JITSERVER=OFF
endif # OPENJ9_ENABLE_JITSERVER

ifeq (true,$(OPENJ9_ENABLE_SNAPSHOTS))
CMAKE_ARGS += -DJ9VM_OPT_SNAPSHOTS=ON
else # OPENJ9_ENABLE_SNAPSHOTS
CMAKE_ARGS += -DJ9VM_OPT_SNAPSHOTS=OFF
endif # OPENJ9_ENABLE_SNAPSHOTS

ifeq (true,$(OPENJ9_ENABLE_CUDA))
CMAKE_ARGS += -DJ9VM_OPT_CUDA=ON -DOMR_CUDA_HOME="$(call UnixPath,$(CUDA_HOME))"
else # OPENJ9_ENABLE_CUDA
Expand Down
20 changes: 20 additions & 0 deletions closed/autoconf/custom-hook.m4
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ AC_DEFUN_ONCE([CUSTOM_EARLY_HOOK],
OPENJ9_CONFIGURE_JFR
OPENJ9_CONFIGURE_JITSERVER
OPENJ9_CONFIGURE_NUMA
OPENJ9_CONFIGURE_SNAPSHOTS
OPENJ9_CONFIGURE_WARNINGS
OPENJ9_THIRD_PARTY_REQUIREMENTS
OPENJ9_CHECK_NASM_VERSION
Expand Down Expand Up @@ -152,6 +153,25 @@ AC_DEFUN([OPENJ9_CONFIGURE_NUMA],
fi
])

AC_DEFUN([OPENJ9_CONFIGURE_SNAPSHOTS],
[
AC_MSG_CHECKING([for snapshot support])
AC_ARG_ENABLE([snapshots], [AS_HELP_STRING([--enable-snapshots],
[enable RAM persistence snapshots @<:@disabled@:>@])])
OPENJ9_ENABLE_SNAPSHOTS=false
if test "x$enable_snapshots" = xyes ; then
AC_MSG_RESULT([yes (explicitly enabled)])
OPENJ9_ENABLE_SNAPSHOTS=true
elif test "x$enable_snapshots" = xno ; then
AC_MSG_RESULT([no (explicitly disabled)])
elif test "x$enable_snapshots" = x ; then
AC_MSG_RESULT([no (default)])
else
AC_MSG_ERROR([--enable-snapshots accepts no argument])
fi
AC_SUBST(OPENJ9_ENABLE_SNAPSHOTS)
])

AC_DEFUN([OPENJ9_CONFIGURE_COMPILERS],
[
AC_ARG_WITH(openj9-cc, [AS_HELP_STRING([--with-openj9-cc], [build OpenJ9 with a specific C compiler])],
Expand Down
1 change: 1 addition & 0 deletions closed/autoconf/custom-spec.gmk.in
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ OPENJ9_ENABLE_DEMOS := @OPENJ9_ENABLE_DEMOS@
OPENJ9_ENABLE_INLINE_TYPES := @OPENJ9_ENABLE_INLINE_TYPES@
OPENJ9_ENABLE_JFR := @OPENJ9_ENABLE_JFR@
OPENJ9_ENABLE_JITSERVER := @OPENJ9_ENABLE_JITSERVER@
OPENJ9_ENABLE_SNAPSHOTS := @OPENJ9_ENABLE_SNAPSHOTS@

# for constructing version output
COMPILER_VERSION_STRING := @COMPILER_VERSION_STRING@
Expand Down

0 comments on commit 67dfc43

Please sign in to comment.