(zilch magic): configurable CA build job count
Change-Id: I6a6a6964f157a33b35dae7245c344be7907c5221
This commit is contained in:
parent
dc7487b9e2
commit
db3b2316f0
2 changed files with 12 additions and 8 deletions
|
|
@ -38,12 +38,12 @@ to final build, or to specific Ninja targets.
|
|||
; Set up the logger.
|
||||
(define (set-print-logs val) #f)
|
||||
(let ((prev-error-handler (current-exception-handler))) (current-exception-handler (lambda data (set-print-logs #t) (apply prev-error-handler data))))
|
||||
(when (terminal-port? (current-error-port))
|
||||
(let-values (((new-out new-err statusbar-set-print-logs logger) (statusbar-logger (current-output-port) (current-error-port) (assoc 'print-build-logs options))))
|
||||
(current-output-port new-out)
|
||||
(current-error-port new-err)
|
||||
(set! set-print-logs statusbar-set-print-logs)
|
||||
(*logger* logger)))
|
||||
; (when (terminal-port? (current-error-port))
|
||||
; (let-values (((new-out new-err statusbar-set-print-logs logger) (statusbar-logger (current-output-port) (current-error-port) (assoc 'print-build-logs options))))
|
||||
; (current-output-port new-out)
|
||||
; (current-error-port new-err)
|
||||
; (set! set-print-logs statusbar-set-print-logs)
|
||||
; (*logger* logger)))
|
||||
|
||||
;; Flags passed to the nix daemon:
|
||||
(define max-jobs (if (assoc 'max-jobs options) (string->number (cdr (assoc 'max-jobs options))) (get-cpu-count)))
|
||||
|
|
@ -52,6 +52,8 @@ to final build, or to specific Ninja targets.
|
|||
(write-string (string-append "Connected to Nix daemon, version " (daemon-link-daemon-version (*daemon*)) "\n") (current-error-port))
|
||||
|
||||
(daemon-wop-set-options (*daemon*) verbosity max-jobs #t)
|
||||
(ca-thread-count max-jobs)
|
||||
|
||||
(import
|
||||
(scheme base) (scheme file) (scheme read)
|
||||
(chicken format)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue