Warn about pdumper not working together with Native Compilation (#14730)
Co-authored-by: Lucius Hu <lebensterben@users.noreply.github.com>
This commit is contained in:
parent
5ad5c6ef83
commit
3cff14b086
|
@ -23,6 +23,10 @@ The portable dumper is a feature that will be available with Emacs 27. This new
|
||||||
dumper should theoretically work on all the three major OSes: GNU/Linux, macOS
|
dumper should theoretically work on all the three major OSes: GNU/Linux, macOS
|
||||||
and Windows.
|
and Windows.
|
||||||
|
|
||||||
|
WARNING: pdumper does not work with Native Compilation, so if you get an error
|
||||||
|
like: =emacs: Trying to load incoherent dumped eln file=, make sure you disable
|
||||||
|
this.
|
||||||
|
|
||||||
** Setup
|
** Setup
|
||||||
To test the portable dumper with Spacemacs, follow these steps:
|
To test the portable dumper with Spacemacs, follow these steps:
|
||||||
|
|
||||||
|
|
|
@ -104,17 +104,26 @@ the end of the loading of the dump file."
|
||||||
(declare (indent defun))
|
(declare (indent defun))
|
||||||
(if (eq 'dumping spacemacs-dump-mode)
|
(if (eq 'dumping spacemacs-dump-mode)
|
||||||
(let ((funcname2 (intern (format "spacemacs//after-dump-%S" funcname))))
|
(let ((funcname2 (intern (format "spacemacs//after-dump-%S" funcname))))
|
||||||
`(progn
|
`(progn
|
||||||
(defun ,funcname2 nil ,@body)
|
(defun ,funcname2 nil ,@body)
|
||||||
(add-to-list 'spacemacs-dump-delayed-functions ',funcname2)))
|
(add-to-list 'spacemacs-dump-delayed-functions ',funcname2)))
|
||||||
`(progn ,@body)))
|
`(progn ,@body)))
|
||||||
|
|
||||||
(defun spacemacs/emacs-with-pdumper-set-p ()
|
(defun spacemacs/emacs-with-pdumper-set-p ()
|
||||||
"Return non-nil if a portable dumper capable emacs executable is set."
|
"Return non-nil if a portable dumper capable Emacs executable is set and
|
||||||
|
native compilation is not in effect."
|
||||||
(and dotspacemacs-enable-emacs-pdumper
|
(and dotspacemacs-enable-emacs-pdumper
|
||||||
(file-exists-p
|
(file-exists-p
|
||||||
(locate-file (or dotspacemacs-emacs-pdumper-executable-file "emacs")
|
(locate-file (or dotspacemacs-emacs-pdumper-executable-file "emacs")
|
||||||
exec-path exec-suffixes 'file-executable-p))))
|
exec-path exec-suffixes 'file-executable-p))
|
||||||
|
(not (spacemacs/emacs-with-native-compilation-enabled-p))))
|
||||||
|
|
||||||
|
(defun spacemacs/emacs-with-native-compilation-enabled-p ()
|
||||||
|
"Return non-nill if native compilation is enabled."
|
||||||
|
(and (featurep 'native-compile)
|
||||||
|
(fboundp 'native-compile-available-p)
|
||||||
|
(native-compile-available-p)
|
||||||
|
(not (eql comp-speed -1))))
|
||||||
|
|
||||||
(defun spacemacs/dump-modes (modes)
|
(defun spacemacs/dump-modes (modes)
|
||||||
"Load given MODES in order to be dumped."
|
"Load given MODES in order to be dumped."
|
||||||
|
|
|
@ -89,9 +89,13 @@ It should only modify the values of Spacemacs settings."
|
||||||
;; This setq-default sexp is an exhaustive list of all the supported
|
;; This setq-default sexp is an exhaustive list of all the supported
|
||||||
;; spacemacs settings.
|
;; spacemacs settings.
|
||||||
(setq-default
|
(setq-default
|
||||||
;; If non-nil then enable support for the portable dumper. You'll need
|
;; If non-nil then enable support for the portable dumper. You'll need to
|
||||||
;; to compile Emacs 27 from source following the instructions in file
|
;; compile Emacs 27 from source following the instructions in file
|
||||||
;; EXPERIMENTAL.org at to root of the git repository.
|
;; EXPERIMENTAL.org at to root of the git repository.
|
||||||
|
;;
|
||||||
|
;; WARNING: pdumper does not work with Native Compilation, so it's disabled
|
||||||
|
;; regardless of the following setting when native compilation is in effect.
|
||||||
|
;;
|
||||||
;; (default nil)
|
;; (default nil)
|
||||||
dotspacemacs-enable-emacs-pdumper nil
|
dotspacemacs-enable-emacs-pdumper nil
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue