From: Andrea Corallo Date: Tue, 26 Nov 2019 20:48:21 +0000 (+0100) Subject: do not emit elc file while native compiling X-Git-Tag: emacs-28.0.90~2727^2~933 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ce254ffa44e33352605e49aaa7d5fc4f545c1add;p=emacs.git do not emit elc file while native compiling --- diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 7be43204a16..5d2558a579d 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -2032,7 +2032,9 @@ The value is non-nil if there were no errors, nil if errors." ;; emacs-lisp files in the build tree are ;; recompiled). Previously this was accomplished by ;; deleting target-file before writing it. - (rename-file tempfile target-file t)) + (if byte-native-compiling + (delete-file tempfile) + (rename-file tempfile target-file t))) (or noninteractive (message "Wrote %s" target-file))) ;; This is just to give a better error message than write-region (let ((exists (file-exists-p target-file)))