tweak: disable ahead-of-time native compilation
Rather than impose a 10-45min compilation step on users, I've disabled ahead-of-time compilation for deferred compilation. In exchange, it will eat up some CPU time the first time each uncompiled package is loaded, but as this happens asynchronously (and are then quietly loaded in the background), I think this is acceptable. An --aot switch (or similar) will be added to `doom sync` and `doom build` in the future, in case folks prefer the old behavior.
This commit is contained in:
parent
b7f84bdd01
commit
3853dff5e1
2 changed files with 22 additions and 5 deletions
|
@ -97,6 +97,16 @@ uses a straight or package.el command directly).")
|
|||
straight-vc-git-default-clone-depth '(1 single-branch))
|
||||
|
||||
(with-eval-after-load 'straight
|
||||
;; HACK Doom relies on deferred compilation, which spares the user 20-50min of
|
||||
;; compilation at install time, but subjects them to ~50% CPU activity when
|
||||
;; starting Emacs for the first time. To complete this, straight.el needs to
|
||||
;; be told not to do native-compilation, but it won't obey
|
||||
;; `straight-disable-native-compile'.
|
||||
;;
|
||||
;; It *will* obey `straight--native-comp-available', though. Trouble is:
|
||||
;; it's a constant; it resets itself when straight is loaded, so it must be
|
||||
;; changed afterwards.
|
||||
(setq straight--native-comp-available nil)
|
||||
;; `let-alist' is built into Emacs 26 and onwards
|
||||
(add-to-list 'straight-built-in-pseudo-packages 'let-alist))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue