feat(cli): add -j/--jobs NUM options
To 'doom sync', 'doom upgrade', and 'doom build'. So users can decide whether they want Doom 100%'ing their CPUs. After 3.0, many of these commands will be merged, so a little code duplication is fine for now.
This commit is contained in:
parent
89e02c1c2b
commit
498d88ba9b
3 changed files with 19 additions and 5 deletions
|
@ -17,12 +17,15 @@
|
|||
|
||||
;; DEPRECATED Replace with "doom sync --rebuild"
|
||||
(defcli! ((build b))
|
||||
((rebuild-p ("-r") "Only rebuild packages that need rebuilding"))
|
||||
((rebuild-p ("-r") "Only rebuild packages that need rebuilding")
|
||||
(jobs ("-j" "--jobs" num) "How many CPUs to use for native compilation"))
|
||||
"Byte-compiles & symlinks installed packages.
|
||||
|
||||
This ensures that all needed files are symlinked from their package repo and
|
||||
their elisp files are byte-compiled. This is especially necessary if you upgrade
|
||||
Emacs (as byte-code is generally not forward-compatible)."
|
||||
(when jobs
|
||||
(setq native-comp-async-jobs-number (truncate jobs)))
|
||||
(when (doom-packages-build (not rebuild-p))
|
||||
(doom-autoloads-reload))
|
||||
t)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue