|
59 | 59 | (unless (get var 'initial-value) |
60 | 60 | (put var 'initial-value (default-value var)))) |
61 | 61 |
|
62 | | -;; Prevent unwanted runtime compilation for gccemacs (native-comp) users; |
63 | | -;; packages are compiled ahead-of-time when they are installed and site files |
64 | | -;; are compiled when gccemacs is installed. |
65 | | -(setq native-comp-deferred-compilation nil) |
66 | | - |
67 | 62 | ;; Since Emacs 27, package initialization occurs before `user-init-file' is |
68 | 63 | ;; loaded, but after `early-init-file'. Doom handles package initialization, so |
69 | 64 | ;; we must prevent Emacs from doing it again. |
@@ -316,6 +311,18 @@ users).") |
316 | 311 | ;;; Native Compilation support (http://akrl.sdf.org/gccemacs.html) |
317 | 312 |
|
318 | 313 | (when (featurep 'native-compile) |
| 314 | + ;; Enable deferred compilation and disable ahead-of-time compilation, so we |
| 315 | + ;; don't bog down the install process with an excruciatingly long compile |
| 316 | + ;; times. It will mean more CPU time at runtime, but given its asynchronosity, |
| 317 | + ;; this is acceptable. |
| 318 | + (setq native-comp-deferred-compilation t |
| 319 | + straight-disable-native-compile t) |
| 320 | + |
| 321 | + ;; Suppress compiler warnings, to avoid inundating users will popups. They |
| 322 | + ;; don't cause breakage, so it's not worth dedicating screen estate to them. |
| 323 | + (setq native-comp-async-report-warnings-errors init-file-debug |
| 324 | + native-comp-warning-on-missing-source init-file-debug) |
| 325 | + |
319 | 326 | ;; Don't store eln files in ~/.emacs.d/eln-cache (where they can easily be |
320 | 327 | ;; deleted by 'doom upgrade'). |
321 | 328 | ;; REVIEW Use `startup-redirect-eln-cache' when 28 support is dropped |
|
0 commit comments