From d86b2e59c746966e1ae023937b2a6b3b8c16d18b Mon Sep 17 00:00:00 2001 From: Stephen Gildea Date: Tue, 5 Oct 2021 09:15:57 -0700 Subject: native-comp-available-p is the definitive test * doc/lispref/compile.texi (Native Compilation): Document native-comp-available-p as the way to test for native compilation. * lisp/emacs-lisp/package.el (package--native-compile-async): * test/lisp/mh-e/mh-utils-tests.el (mh-ensure-native-trampolines): Test for native compilation with native-comp-available-p. Thank you to Andrea Corallo for reviewing this patch. --- lisp/emacs-lisp/package.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 62f5fc73417..5445fa970f8 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1081,8 +1081,7 @@ This assumes that `pkg-desc' has already been activated with "Native compile installed package PKG-DESC asynchronously. This assumes that `pkg-desc' has already been activated with `package-activate-1'." - (when (and (featurep 'native-compile) - (native-comp-available-p)) + (when (native-comp-available-p) (let ((warning-minimum-level :error)) (native-compile-async (package-desc-dir pkg-desc) t)))) -- cgit v1.2.3