           (or (if force-p :all straight--packages-to-rebuild)
               (make-hash-table :test #'equal)))
          (recipes (doom-package-recipe-list)))
+     (add-hook 'comp-async-cu-done-hook #'doom--native-compile-done-h)
      (unless force-p
        (straight--make-build-cache-available))
      (if-let (built

                            (straight--call "git" "config" "core.autocrlf" "true")))))
                  (error
                   (signal 'doom-package-error (list package e))))))
         (print! (success "Installed %d packages")
                 (length built))
       (print! (info "No packages need to be installed"))
       nil))))


                             ;; Doesn't make sense to compare el and elc files
                             ;; when the former isn't a symlink to their source.
                             (when straight-use-symlinks
                               (cl-loop for file in (doom-files-in build-dir :match "\\.el$" :full t)
                                        with want-byte = (straight--byte-compile-package-p recipe)
                                        with want-native = (straight--native-compile-package-p recipe)
                                        with outdated = nil
                                        if (and (file-symlink-p file)
                                                (or (and want-byte (doom--elc-file-outdated-p file))
                                                    (and want-native (doom--eln-file-outdated-p file))))
                                        do (setq outdated t)
                                        finally return outdated)))
                         (not (plist-get recipe :no-build))
                         (puthash package t straight--packages-to-rebuild))))
                (straight-use-package (intern package))))
         (progn
           (doom--wait-for-compile-jobs)
           (print! (success "Rebuilt %d package(s)") (length built)))
       (print! (success "No packages need rebuilding"))
       nil))))

