Add minimal-emacs-enable-native-compilation
This commit is contained in:
@@ -65,6 +65,13 @@ tradeoff is that the mode line is hidden during the startup phase.")
|
|||||||
When set to non-nil, Emacs will automatically call `package-initialize' and
|
When set to non-nil, Emacs will automatically call `package-initialize' and
|
||||||
`package-refresh-contents' to set up and update the package system.")
|
`package-refresh-contents' to set up and update the package system.")
|
||||||
|
|
||||||
|
(defvar minimal-emacs-setup-native-compilation t
|
||||||
|
"If non-nil, enable and configure native compilation.
|
||||||
|
When enabled, this variable sets the following:
|
||||||
|
- `native-comp-deferred-compilation'
|
||||||
|
- `native-comp-jit-compilation'
|
||||||
|
- `package-native-compile'")
|
||||||
|
|
||||||
(defvar minimal-emacs-user-directory user-emacs-directory
|
(defvar minimal-emacs-user-directory user-emacs-directory
|
||||||
"The default value of the `user-emacs-directory' variable.")
|
"The default value of the `user-emacs-directory' variable.")
|
||||||
|
|
||||||
@@ -141,9 +148,9 @@ pre-early-init.el, and post-early-init.el.")
|
|||||||
(fboundp 'native-comp-available-p)
|
(fboundp 'native-comp-available-p)
|
||||||
(native-comp-available-p))
|
(native-comp-available-p))
|
||||||
;; Activate `native-compile'
|
;; Activate `native-compile'
|
||||||
(setq native-comp-jit-compilation t
|
(setq native-comp-deferred-compilation minimal-emacs-setup-native-compilation
|
||||||
native-comp-deferred-compilation t
|
native-comp-jit-compilation minimal-emacs-setup-native-compilation
|
||||||
package-native-compile t)
|
package-native-compile minimal-emacs-setup-native-compilation)
|
||||||
;; Deactivate the `native-compile' feature if it is not available
|
;; Deactivate the `native-compile' feature if it is not available
|
||||||
(setq features (delq 'native-compile features)))
|
(setq features (delq 'native-compile features)))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user