;;; tool.
;;;
-;; Attempt to use our very own Guix modules.
+(use-modules (system base compile))
+
(eval-when (compile load eval)
- ;; Ignore any available .go, and force recompilation. This is because our
- ;; checkout in the store has mtime set to the epoch, and thus .go files look
- ;; newer, even though they may not correspond.
+ ;; Pre-load the compiler so we don't end up auto-compiling it.
+ (compile #t)
+
+ ;; Use our very own Guix modules.
(set! %fresh-auto-compile #t)
(and=> (assoc-ref (current-source-location) 'filename)
"Return a job for PACKAGE on SYSTEM, or #f if this combination is not
valid."
(cond ((member package base-packages)
- #f)
+ (package-job store (symbol-append 'base. (job-name package))
+ package system))
((supported-package? package system)
(let ((drv (package-derivation store package system
#:graft? #f)))
(define (all-packages)
"Return the list of packages to build."
- (fold-packages (lambda (package result)
- (cond ((package-replacement package)
- (cons* package ;build both
- (package-replacement package)
- result))
- ((package-superseded package)
- result) ;don't build it
- (else
- (cons package result))))
- '()))
+ (define (adjust package result)
+ (cond ((package-replacement package)
+ (cons* package ;build both
+ (package-replacement package)
+ result))
+ ((package-superseded package)
+ result) ;don't build it
+ (else
+ (cons package result))))
+
+ (fold-packages adjust
+ (fold adjust '() ;include base packages
+ (match (%final-inputs)
+ (((labels packages _ ...) ...)
+ packages)))
+ #:select? (const #t))) ;include hidden packages
\f
;;;
(define (pointless? target)
;; Return #t if it makes no sense to cross-build to TARGET from SYSTEM.
- (and (string-contains target "mingw")
- (not (string=? "x86_64-linux" system))))
+ (match system
+ ((or "x86_64-linux" "i686-linux")
+ (if (string-contains target "mingw")
+ (not (string=? "x86_64-linux" system))
+ #f))
+ (_
+ ;; Don't try to cross-compile from non-Intel platforms: this isn't
+ ;; very useful and these are often brittle configurations.
+ #t)))
(define (either proc1 proc2 proc3)
(lambda (x)
(parameterize ((%graft? #f))
;; Return one job for each package, except bootstrap packages.
(append-map (lambda (system)
+ (format (current-error-port)
+ "evaluating for '~a' (heap size: ~a MiB)...~%"
+ system
+ (round
+ (/ (assoc-ref (gc-stats) 'heap-size)
+ (expt 2. 20))))
+ (invalidate-derivation-caches!)
(case subset
((all)
;; Build everything, including replacements.