From 43623d7c5eeab64ef77feee1d859ddd5025e84fb Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 29 Apr 2021 13:24:27 -0400 Subject: [PATCH] Fix #4947: naive native-comp checks Now, checking for the comp package is no longer sufficient to determine if native-compilation is enabled. --- core/cli/packages.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index a2a1fb850..146717bfe 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -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)