Add --with-native-compilation=aot configuration option

* configure.ac: Allow --with-native-compilation=aot to switch full
ahead-of-time on.

* lisp/Makefile.in: Use the setting from configure.
This commit is contained in:
Lars Ingebrigtsen 2022-10-03 12:45:21 +02:00
parent 450d94920f
commit e245c4f226
3 changed files with 35 additions and 1 deletions

View file

@ -494,7 +494,6 @@ OPTION_DEFAULT_ON([gnutls],[don't use -lgnutls for SSL/TLS support])
OPTION_DEFAULT_ON([zlib],[don't compile with zlib decompression support])
OPTION_DEFAULT_ON([modules],[don't compile with dynamic modules support])
OPTION_DEFAULT_ON([threads],[don't compile with elisp threading support])
OPTION_DEFAULT_OFF([native-compilation],[compile with Emacs Lisp native compiler support])
OPTION_DEFAULT_OFF([cygwin32-native-compilation],[use native compilation on 32-bit Cygwin])
OPTION_DEFAULT_ON([xinput2],[don't use version 2 of the X Input Extension for input])
OPTION_DEFAULT_OFF([small-ja-dic],[generate a smaller-size Japanese dictionary])
@ -1009,6 +1008,29 @@ AC_ARG_ENABLE([gcc-warnings],
[gl_GCC_VERSION_IFELSE([5], [3], [gl_gcc_warnings=warn-only])])
fi])
NATIVE_COMPILATION_AOT=no
AC_ARG_WITH([native-compilation],
[AS_HELP_STRING([--with-native-compilation@<:@=TYPE@:>@],
[compile with Emacs Lisp native compiler support. The TYPE
'yes' (or empty) means to enable it and compile natively
preloaded Lisp files; 'no' means to disable it;
'aot' will make the build process compile all the Lisp
files in the tree natively ahead of time. (This will
usually be quite slow.)])],
[
case $withval in
aot)
withval=yes
NATIVE_COMPILATION_AOT=yes
;;
yes|no) ;;
*) AC_MSG_ERROR([bad value $withval for native-compilation option]) ;;
esac
with_native_compilation=$withval],
[with_native_compilation=no]
)
AC_SUBST([NATIVE_COMPILATION_AOT])
AC_ARG_ENABLE([check-lisp-object-type],
[AS_HELP_STRING([--enable-check-lisp-object-type],
[Enable compile time checks for the Lisp_Object data type,

View file

@ -24,6 +24,12 @@ applies, and please also update docstrings as needed.
* Installation Changes in Emacs 29.1
---
** Ahead-of-time native compilation can now be specified via configure.
Use --with-native-compilation=aot to specify that all the Lisp files
in the Emacs tree should be natively compiled ahead of time. (This is
slow on most machines.)
+++
** Emacs can be built with built-in support for accessing SQLite databases.
This uses the popular sqlite3 library, and can be disabled by using

View file

@ -31,10 +31,16 @@ EXEEXT = @EXEEXT@
XARGS_LIMIT = @XARGS_LIMIT@
HAVE_NATIVE_COMP = @HAVE_NATIVE_COMP@
NATIVE_COMPILATION_AOT = @NATIVE_COMPILATION_AOT@
ifeq ($(HAVE_NATIVE_COMP),yes)
# Environment variable to enable Ahead-Of-Time compilation.
ifndef NATIVE_FULL_AOT
NATIVE_SKIP_NONDUMP = 1
endif
# Configured for Ahead-Of-Time compilation.
ifeq ($(NATIVE_COMPILATION_AOT),yes)
NATIVE_SKIP_NONDUMP = ""
endif
endif
-include ${top_builddir}/src/verbose.mk