mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
Suspend temp .elc production when native compiling till when necessary
* lisp/emacs-lisp/bytecomp.el (byte-to-native-output-buffer-file): Rename from `byte-to-native-output-file'. (byte-write-target-file): Update. (byte-compile-file): Write the temporary .elc only when not native compiling. (byte-compile-file): Kill the .elc buffer only when not native compiling. * lisp/emacs-lisp/comp.el (batch-byte+native-compile): Instead of just renaming the temporary .elc make use of `byte-write-target-file' to write it down and kill the temporary buffer.
This commit is contained in:
parent
6a79de530f
commit
9396b7d0b4
2 changed files with 16 additions and 9 deletions
|
|
@ -4212,11 +4212,13 @@ variable 'NATIVE_DISABLED' is set, only byte compile."
|
|||
(batch-byte-compile)
|
||||
(cl-assert (length= command-line-args-left 1))
|
||||
(let ((byte+native-compile t)
|
||||
(byte-to-native-output-file nil))
|
||||
(byte-to-native-output-buffer-file nil))
|
||||
(batch-native-compile)
|
||||
(pcase byte-to-native-output-file
|
||||
(`(,tempfile . ,target-file)
|
||||
(rename-file tempfile target-file t)))
|
||||
(pcase byte-to-native-output-buffer-file
|
||||
(`(,temp-buffer . ,target-file)
|
||||
(unwind-protect
|
||||
(byte-write-target-file temp-buffer target-file))
|
||||
(kill-buffer temp-buffer)))
|
||||
(setq command-line-args-left (cdr command-line-args-left)))))
|
||||
|
||||
;;;###autoload
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue