diff options
author | Eli Zaretskii <eliz@gnu.org> | 2018-08-23 19:40:19 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2018-08-23 19:40:19 +0300 |
commit | 39c6bef85897bd45753d9ee3a1e19d9a161f16ce (patch) | |
tree | c2868a238de5b149070ee1a737752187f4878785 /configure.ac | |
parent | 7fbcc5b533b5e0bd8ffc9bd50541ce18a35a7372 (diff) | |
download | emacs-39c6bef85897bd45753d9ee3a1e19d9a161f16ce.tar.gz |
Fix MS-Windows build with libjit
This fixes 32-bit MS-Windows build and hopefully also 64-bit
MS-Windows build (not tested). 32-bit MS-Windows build with wide ints
still doesn't work: I get invalid Lisp objects after JIT compiled code
is invoked.
* configure.ac (HAVE_LIBJIT) [mingw32]: Remove -ljit from
LIBJIT_LIBS, to avoid linking against libjit at build time and
allow loading libjit dynamically at run time.
* src/jit.c [WINDOWSNT]: Include w32.h and w32common.h.
[WINDOWSNT] (DEF_DLL_VAR, LOAD_DLL_VAR): New macros.
(init_libjit_functions) [WINDOWSNT]: New function.
(CONSTANT): A separate version for builds where EMACS_INT_MAX
is equal to INT_MAX (32-bit builds without wide ints). Use
XLI when assigning Lisp objects to integer values.
(untag, compile_make_natnum, compile_make_number)
(unary_intmath): Handle the case of EMACS_INT_MAX > LONG_MAX.
(compile_current_thread, compile): Don't use CONSTANT for
anything that is not a Lisp object.
(emacs_jit_compile): Do nothing if jit-disable is non-nil.
Use XLP to assign and compare Lisp objects to pointers.
(syms_of_jit): New boolean variable jit-disable, by default nil.
(init_jit) [WINDOWSNT]: Call init_libjit_functions.
Define lisp_object_type separately for 64-bit Windows builds
and 32-bit builds with wide ints. Fix some signatures to use
lisp_object_type and correct some that deviated from the
actual functions.
* src/lisp.h (USE_STACK_LISP_OBJECTS): Define to false for
32-bit MinGW builds with libjit.
* src/w32fns.c (syms_of_w32fns) <libjit>: New symbol.
* src/eval.c (Ffuncall, funcall_lambda): Use XLP to compare
Lisp_Object vs a pointer.
* src/emacs.c (main): Move the call to init_jit to before
init_buffer, as the latter calls Lisp and could use JIT.
* src/alloc.c (Fmake_byte_code): Use XPL to assign pointer to
a Lisp_Object field.
* lisp/term/w32-win.el (dynamic-library-alist): Add libjit-0.dll.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 8baeba72846..9b4bcf837f3 100644 --- a/configure.ac +++ b/configure.ac @@ -3534,6 +3534,10 @@ if test "${with_libjit}" != "no"; then EMACS_CHECK_MODULES([LIBJIT], [$LIBJIT_MODULES]) if test "${HAVE_LIBJIT}" = "yes"; then AC_DEFINE([HAVE_LIBJIT], 1, [Define to 1 if you have the libjit library (-ljit).]) + ### mingw32 doesn't use -ljit, since it loads the library dynamically. + if test "${opsys}" = "mingw32"; then + LIBJIT_LIBS= + fi fi fi |