198 [
199 AC_ARG_ENABLE([aot], [AS_HELP_STRING([--enable-aot@<:@=yes/no/auto@:>@],
200 [enable ahead of time compilation feature. Default is auto, where aot is enabled if all dependencies are present.])])
201
202 if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
203 ENABLE_AOT="true"
204 elif test "x$enable_aot" = "xyes"; then
205 ENABLE_AOT="true"
206 elif test "x$enable_aot" = "xno"; then
207 ENABLE_AOT="false"
208 AC_MSG_CHECKING([if aot should be enabled])
209 AC_MSG_RESULT([no, forced])
210 else
211 AC_MSG_ERROR([Invalid value for --enable-aot: $enable_aot])
212 fi
213
214 if test "x$ENABLE_AOT" = "xtrue"; then
215 # Only enable AOT on linux-X64.
216 if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then
217 if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
218 if test -e "$HOTSPOT_TOPDIR/src/jdk.vm.compiler"; then
219 ENABLE_AOT="true"
220 else
221 ENABLE_AOT="false"
222 if test "x$enable_aot" = "xyes"; then
223 AC_MSG_ERROR([Cannot build AOT without hotspot/src/jdk.vm.compiler sources. Remove --enable-aot.])
224 fi
225 fi
226 else
227 ENABLE_AOT="false"
228 if test "x$enable_aot" = "xyes"; then
229 AC_MSG_ERROR([Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot.])
230 fi
231 fi
232 else
233 ENABLE_AOT="false"
234 if test "x$enable_aot" = "xyes"; then
235 AC_MSG_ERROR([AOT is currently only supported on Linux-x86_64. Remove --enable-aot.])
236 fi
237 fi
238 fi
239
240 AC_SUBST(ENABLE_AOT)
241 ])
242
243 ###############################################################################
310 if HOTSPOT_CHECK_JVM_FEATURE(zero); then
311 AC_MSG_ERROR([To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark])
312 fi
313 fi
314
315 if ! HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then
316 if HOTSPOT_CHECK_JVM_FEATURE(shark); then
317 AC_MSG_ERROR([To enable shark, you must use --with-jvm-variants=zeroshark])
318 fi
319 fi
320
321 # Only enable jvmci on x86_64, sparcv9 and aarch64.
322 if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
323 test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
324 test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
325 JVM_FEATURES_jvmci="jvmci"
326 else
327 JVM_FEATURES_jvmci=""
328 fi
329
330 AC_MSG_CHECKING([if jdk.vm.compiler should be built])
331 if HOTSPOT_CHECK_JVM_FEATURE(graal); then
332 AC_MSG_RESULT([yes, forced])
333 if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
334 AC_MSG_ERROR([Specified JVM feature 'graal' requires feature 'jvmci'])
335 fi
336 INCLUDE_GRAAL="true"
337 else
338 # By default enable graal build where AOT is available
339 if test "x$ENABLE_AOT" = "xtrue"; then
340 AC_MSG_RESULT([yes])
341 JVM_FEATURES_graal="graal"
342 INCLUDE_GRAAL="true"
343 else
344 AC_MSG_RESULT([no])
345 JVM_FEATURES_graal=""
346 INCLUDE_GRAAL="false"
347 fi
348 fi
349
350 AC_SUBST(INCLUDE_GRAAL)
|
198 [
199 AC_ARG_ENABLE([aot], [AS_HELP_STRING([--enable-aot@<:@=yes/no/auto@:>@],
200 [enable ahead of time compilation feature. Default is auto, where aot is enabled if all dependencies are present.])])
201
202 if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
203 ENABLE_AOT="true"
204 elif test "x$enable_aot" = "xyes"; then
205 ENABLE_AOT="true"
206 elif test "x$enable_aot" = "xno"; then
207 ENABLE_AOT="false"
208 AC_MSG_CHECKING([if aot should be enabled])
209 AC_MSG_RESULT([no, forced])
210 else
211 AC_MSG_ERROR([Invalid value for --enable-aot: $enable_aot])
212 fi
213
214 if test "x$ENABLE_AOT" = "xtrue"; then
215 # Only enable AOT on linux-X64.
216 if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then
217 if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
218 if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then
219 ENABLE_AOT="true"
220 else
221 ENABLE_AOT="false"
222 if test "x$enable_aot" = "xyes"; then
223 AC_MSG_ERROR([Cannot build AOT without hotspot/src/jdk.internal.vm.compiler sources. Remove --enable-aot.])
224 fi
225 fi
226 else
227 ENABLE_AOT="false"
228 if test "x$enable_aot" = "xyes"; then
229 AC_MSG_ERROR([Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot.])
230 fi
231 fi
232 else
233 ENABLE_AOT="false"
234 if test "x$enable_aot" = "xyes"; then
235 AC_MSG_ERROR([AOT is currently only supported on Linux-x86_64. Remove --enable-aot.])
236 fi
237 fi
238 fi
239
240 AC_SUBST(ENABLE_AOT)
241 ])
242
243 ###############################################################################
310 if HOTSPOT_CHECK_JVM_FEATURE(zero); then
311 AC_MSG_ERROR([To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark])
312 fi
313 fi
314
315 if ! HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then
316 if HOTSPOT_CHECK_JVM_FEATURE(shark); then
317 AC_MSG_ERROR([To enable shark, you must use --with-jvm-variants=zeroshark])
318 fi
319 fi
320
321 # Only enable jvmci on x86_64, sparcv9 and aarch64.
322 if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
323 test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
324 test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
325 JVM_FEATURES_jvmci="jvmci"
326 else
327 JVM_FEATURES_jvmci=""
328 fi
329
330 AC_MSG_CHECKING([if jdk.internal.vm.compiler should be built])
331 if HOTSPOT_CHECK_JVM_FEATURE(graal); then
332 AC_MSG_RESULT([yes, forced])
333 if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
334 AC_MSG_ERROR([Specified JVM feature 'graal' requires feature 'jvmci'])
335 fi
336 INCLUDE_GRAAL="true"
337 else
338 # By default enable graal build where AOT is available
339 if test "x$ENABLE_AOT" = "xtrue"; then
340 AC_MSG_RESULT([yes])
341 JVM_FEATURES_graal="graal"
342 INCLUDE_GRAAL="true"
343 else
344 AC_MSG_RESULT([no])
345 JVM_FEATURES_graal=""
346 INCLUDE_GRAAL="false"
347 fi
348 fi
349
350 AC_SUBST(INCLUDE_GRAAL)
|