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
|
||||
`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
|
||||
"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)
|
||||
(native-comp-available-p))
|
||||
;; Activate `native-compile'
|
||||
(setq native-comp-jit-compilation t
|
||||
native-comp-deferred-compilation t
|
||||
package-native-compile t)
|
||||
(setq native-comp-deferred-compilation minimal-emacs-setup-native-compilation
|
||||
native-comp-jit-compilation minimal-emacs-setup-native-compilation
|
||||
package-native-compile minimal-emacs-setup-native-compilation)
|
||||
;; Deactivate the `native-compile' feature if it is not available
|
||||
(setq features (delq 'native-compile features)))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user