        (not (straight--plist-get recipe :no-native-compile
                                  straight-disable-native-compilation))))
 
+(defun straight--native-compile-file-p (file)
+  "Predicate to check whether FILE should be native-compiled."
+  (not (cl-some (lambda (re)
+                  (string-match-p re file))
+                comp-deferred-compilation-deny-list)))
+
 (defun straight--native-compile-package (recipe)
   "Queue native compilation for the symlinked package specified by RECIPE.
 RECIPE should be a straight.el-style plist. Note that this

;;;; Functions from other packages

;; `comp'
(defvar comp-deferred-compilation-black-list)

;; `finder-inf'
(defvar package--builtins)

                (message-log-max nil))
            (native-compile-async
             (straight--build-dir package)
             'recursively nil
             #'straight--native-compile-file-p))
        ;; Prevent compilation of this package
        (add-to-list 'comp-deferred-compilation-deny-list
                     (format "^%s" (straight--build-dir package)))))))

;;;;; Info compilation
