Fix #4947: naive native-comp checks

Now, checking for the comp package is no longer sufficient to determine
if native-compilation is enabled.
This commit is contained in:
Henrik Lissner 2021-04-29 13:24:27 -04:00
parent ccf6f0b53d
commit 43623d7c5e

View file

@ -315,7 +315,9 @@ declaration) or dependency thereof that hasn't already been."
(when (eq (car-safe build) :not)
(setq want-byte-compile (not want-byte-compile)
want-native-compile (not want-native-compile)))
(unless (require 'comp nil t)
(unless (and (require 'comp nil t)
(featurep 'nativecomp)
(ignore-errors (native-comp-available-p)))
(setq want-native-compile nil))
(and (or want-byte-compile want-native-compile)
(or (file-newer-than-file-p repo-dir build-dir)