Skip to content

Commit

Permalink
Fix `no-byte-compile' native compilation interaction (bug#47169)
Browse files Browse the repository at this point in the history
	* lisp/emacs-lisp/comp.el (comp-spill-lap-function): Throw
	no-native-compile when `byte-native-qualities' are null.
	* lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): No need
	to consider `no-byte-compile'.
  • Loading branch information
AndreaCorallo committed Mar 16, 2021
1 parent f3abb17 commit 3e133cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lisp/emacs-lisp/bytecomp.el
Expand Up @@ -2277,8 +2277,7 @@ With argument ARG, insert value in current buffer after the form."
(push `(comp-native-driver-options . ,comp-native-driver-options)
byte-native-qualities)
(defvar no-native-compile)
;; `no-byte-compile' implies also `no-native-compile'.
(push `(no-native-compile . ,(or no-byte-compile no-native-compile))
(push `(no-native-compile . ,no-native-compile)
byte-native-qualities))

;; Compile the forms from the input buffer.
Expand Down
3 changes: 2 additions & 1 deletion lisp/emacs-lisp/comp.el
Expand Up @@ -1315,7 +1315,8 @@ clashes."
(cl-defmethod comp-spill-lap-function ((filename string))
"Byte-compile FILENAME, spilling data from the byte compiler."
(byte-compile-file filename)
(when (alist-get 'no-native-compile byte-native-qualities)
(when (or (null byte-native-qualities)
(alist-get 'no-native-compile byte-native-qualities))
(throw 'no-native-compile nil))
(unless byte-to-native-top-level-forms
(signal 'native-compiler-error-empty-byte filename))
Expand Down

0 comments on commit 3e133cc

Please sign in to comment.