1 #
2 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # This code is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License version 2 only, as
7 # published by the Free Software Foundation. Oracle designates this
8 # particular file as subject to the "Classpath" exception as provided
9 # by Oracle in the LICENSE file that accompanied this code.
10 #
11 # This code is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 # version 2 for more details (a copy is included in the LICENSE file that
15 # accompanied this code).
16 #
17 # You should have received a copy of the GNU General Public License version
18 # 2 along with this work; if not, write to the Free Software Foundation,
19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 #
21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 # or visit www.oracle.com if you need additional information or have any
196 # Check if AOT should be enabled
197 #
198 AC_DEFUN_ONCE([HOTSPOT_ENABLE_DISABLE_AOT],
199 [
200 AC_ARG_ENABLE([aot], [AS_HELP_STRING([--enable-aot@<:@=yes/no/auto@:>@],
201 [enable ahead of time compilation feature. Default is auto, where aot is enabled if all dependencies are present.])])
202
203 if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
204 ENABLE_AOT="true"
205 elif test "x$enable_aot" = "xyes"; then
206 ENABLE_AOT="true"
207 elif test "x$enable_aot" = "xno"; then
208 ENABLE_AOT="false"
209 AC_MSG_CHECKING([if aot should be enabled])
210 AC_MSG_RESULT([no, forced])
211 else
212 AC_MSG_ERROR([Invalid value for --enable-aot: $enable_aot])
213 fi
214
215 if test "x$ENABLE_AOT" = "xtrue"; then
216 # Only enable AOT on linux-X64.
217 if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then
218 if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
219 if test -e "$HOTSPOT_TOPDIR/src/jdk.vm.compiler"; then
220 ENABLE_AOT="true"
221 else
222 ENABLE_AOT="false"
223 if test "x$enable_aot" = "xyes"; then
224 AC_MSG_ERROR([Cannot build AOT without hotspot/src/jdk.vm.compiler sources. Remove --enable-aot.])
225 fi
226 fi
227 else
228 ENABLE_AOT="false"
229 if test "x$enable_aot" = "xyes"; then
230 AC_MSG_ERROR([Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot.])
231 fi
232 fi
233 else
234 ENABLE_AOT="false"
235 if test "x$enable_aot" = "xyes"; then
236 AC_MSG_ERROR([AOT is currently only supported on Linux-x86_64. Remove --enable-aot.])
237 fi
|
1 #
2 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # This code is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License version 2 only, as
7 # published by the Free Software Foundation. Oracle designates this
8 # particular file as subject to the "Classpath" exception as provided
9 # by Oracle in the LICENSE file that accompanied this code.
10 #
11 # This code is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 # version 2 for more details (a copy is included in the LICENSE file that
15 # accompanied this code).
16 #
17 # You should have received a copy of the GNU General Public License version
18 # 2 along with this work; if not, write to the Free Software Foundation,
19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 #
21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 # or visit www.oracle.com if you need additional information or have any
196 # Check if AOT should be enabled
197 #
198 AC_DEFUN_ONCE([HOTSPOT_ENABLE_DISABLE_AOT],
199 [
200 AC_ARG_ENABLE([aot], [AS_HELP_STRING([--enable-aot@<:@=yes/no/auto@:>@],
201 [enable ahead of time compilation feature. Default is auto, where aot is enabled if all dependencies are present.])])
202
203 if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
204 ENABLE_AOT="true"
205 elif test "x$enable_aot" = "xyes"; then
206 ENABLE_AOT="true"
207 elif test "x$enable_aot" = "xno"; then
208 ENABLE_AOT="false"
209 AC_MSG_CHECKING([if aot should be enabled])
210 AC_MSG_RESULT([no, forced])
211 else
212 AC_MSG_ERROR([Invalid value for --enable-aot: $enable_aot])
213 fi
214
215 if test "x$ENABLE_AOT" = "xtrue"; then
216 # Only enable AOT on X64 platforms.
217 if test "x$OPENJDK_TARGET_CPU" = "xx86_64" ||
218 test "x$OPENJDK_TARGET_CPU" = "xamd64"; then
219 if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
220 if test -e "$HOTSPOT_TOPDIR/src/jdk.vm.compiler"; then
221 ENABLE_AOT="true"
222 else
223 ENABLE_AOT="false"
224 if test "x$enable_aot" = "xyes"; then
225 AC_MSG_ERROR([Cannot build AOT without hotspot/src/jdk.vm.compiler sources. Remove --enable-aot.])
226 fi
227 fi
228 else
229 ENABLE_AOT="false"
230 if test "x$enable_aot" = "xyes"; then
231 AC_MSG_ERROR([Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot.])
232 fi
233 fi
234 else
235 ENABLE_AOT="false"
236 if test "x$enable_aot" = "xyes"; then
237 AC_MSG_ERROR([AOT is currently only supported on Linux-x86_64. Remove --enable-aot.])
238 fi
|