When minimal-emacs-setup-native-compilation is nil, leave native-comp variables to their default values
This commit is contained in:
@@ -74,11 +74,14 @@ 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
|
(defvar minimal-emacs-setup-native-compilation t
|
||||||
"If non-nil, enable and configure native compilation.
|
"Controls whether native compilation settings are enabled during setup.
|
||||||
When enabled, this variable sets the following:
|
When non-nil, the following variables are set to non-nil to enable
|
||||||
|
native compilation features:
|
||||||
- `native-comp-deferred-compilation'
|
- `native-comp-deferred-compilation'
|
||||||
- `native-comp-jit-compilation'
|
- `native-comp-jit-compilation'
|
||||||
- `package-native-compile'")
|
- `package-native-compile'
|
||||||
|
If nil, these variables are left at their default values and are not
|
||||||
|
modified during setup.")
|
||||||
|
|
||||||
(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.")
|
||||||
@@ -155,10 +158,11 @@ pre-early-init.el, and post-early-init.el.")
|
|||||||
(if (and (featurep 'native-compile)
|
(if (and (featurep 'native-compile)
|
||||||
(fboundp 'native-comp-available-p)
|
(fboundp 'native-comp-available-p)
|
||||||
(native-comp-available-p))
|
(native-comp-available-p))
|
||||||
|
(when minimal-emacs-setup-native-compilation
|
||||||
;; Activate `native-compile'
|
;; Activate `native-compile'
|
||||||
(setq native-comp-deferred-compilation minimal-emacs-setup-native-compilation
|
(setq native-comp-deferred-compilation t
|
||||||
native-comp-jit-compilation minimal-emacs-setup-native-compilation
|
native-comp-jit-compilation t
|
||||||
package-native-compile minimal-emacs-setup-native-compilation)
|
package-native-compile t))
|
||||||
;; 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