mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-15 09:47:20 +00:00
remove old eln before creating a new one to prevent crashes
This commit is contained in:
parent
f6b58e8016
commit
6a546e63d0
@ -3078,8 +3078,14 @@ DEFUN ("comp--compile-ctxt-to-file", Fcomp__compile_ctxt_to_file,
|
||||
gcc_jit_context_dump_reproducer_to_file (comp.ctxt, "comp_reproducer.c");
|
||||
|
||||
AUTO_STRING (dot_so, NATIVE_ELISP_SUFFIX);
|
||||
|
||||
Lisp_Object out_file = CALLN (Fconcat, ctxtname, dot_so);
|
||||
|
||||
/* Remove the old eln before creating the new one to get a new inode and
|
||||
prevent crashes in case the old one is currently loaded. */
|
||||
if (!NILP (Ffile_exists_p (out_file)))
|
||||
Fdelete_file (out_file, Qnil);
|
||||
|
||||
gcc_jit_context_compile_to_file (comp.ctxt,
|
||||
GCC_JIT_OUTPUT_KIND_DYNAMIC_LIBRARY,
|
||||
SSDATA (out_file));
|
||||
|
Loading…
Reference in New Issue
Block a user