1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-26 07:33:47 +00:00

do not compile if there's nothing to

This commit is contained in:
Andrea Corallo 2019-11-13 21:25:00 +01:00
parent 9b44051ea5
commit 0f526028b1

View File

@ -433,6 +433,8 @@ Put PREFIX in front of it."
(defun comp-spill-lap-functions-file (filename)
"Byte compile FILENAME spilling data from the byte compiler."
(byte-compile-file filename)
(unless byte-to-native-top-level-forms
(error "Empty byte compiler output"))
(setf (comp-ctxt-top-level-forms comp-ctxt) (reverse byte-to-native-top-level-forms))
(cl-loop
for f in (cl-loop for x in byte-to-native-top-level-forms ; All non anonymous.
@ -1767,10 +1769,9 @@ Prepare every function for final compilation and drive the C back-end."
(defun comp-to-file-p (file)
"Return t if FILE has to be compiled."
(let ((compiled-f (concat file "n")))
(and (null (string-match-p "autoloads.el" file))
(or comp-always-compile
(not (and (file-exists-p compiled-f)
(file-newer-than-file-p compiled-f file)))))))
(or comp-always-compile
(not (and (file-exists-p compiled-f)
(file-newer-than-file-p compiled-f file))))))
(defun comp-start-async-worker ()
"Start an async compiler worker."