aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2020-05-14 21:32:30 +0200
committerRicardo Wurmus <rekado@elephly.net>2020-05-15 13:09:10 +0200
commitf5789c265de99952ec703c3a5d8a2bfc1d9aa4d2 (patch)
tree55c404c358448337a332e2cfd8b5a65d2de3b448
parentb7a1cac603817dce2d717b490d2bff29bee46ac6 (diff)
downloadguix-f5789c265de99952ec703c3a5d8a2bfc1d9aa4d2.tar.gz
guix-f5789c265de99952ec703c3a5d8a2bfc1d9aa4d2.zip
gnu: openjdk9: Build in parallel.
* gnu/packages/java.scm (openjdk9)[arguments]: Add phase "write-source-revision-file"; replace "build" phase; add make-flags; remove GUIX_LD_WRAPPER_ALLOW_IMPURITIES.
-rw-r--r--gnu/packages/java.scm16
1 files changed, 11 insertions, 5 deletions
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index d03d783448..ef7796f681 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -1815,6 +1815,7 @@ new Date();"))
(outputs '("out" "jdk" "doc"))
(arguments
`(#:tests? #f; require jtreg
+ #:make-flags '("all")
#:imported-modules
((guix build syscalls)
,@%gnu-build-system-modules)
@@ -1839,14 +1840,20 @@ new Date();"))
"--with-libjpeg=system"
(string-append "--prefix=" (assoc-ref outputs "out")))
#t))
- (replace 'build
+ (add-before 'build 'write-source-revision-file
(lambda _
(with-output-to-file ".src-rev"
(lambda _
(display ,version)))
- (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
- (invoke "make" "all")
#t))
+ (replace 'build
+ (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
+ (apply invoke "make"
+ `(,@(if parallel-build?
+ (list (string-append "JOBS="
+ (number->string (parallel-job-count))))
+ '())
+ ,@make-flags))))
;; Some of the libraries in the lib/ folder link to libjvm.so.
;; But that shared object is located in the server/ folder, so it
;; cannot be found. This phase creates a symbolic link in the
@@ -1919,8 +1926,7 @@ new Date();"))
(native-inputs
`(("icedtea-8" ,icedtea-8)
("icedtea-8:jdk" ,icedtea-8 "jdk")
- ;; XXX: The build system is not particularly parallel safe and
- ;; fails with newer versions of GNU Make.
+ ;; XXX: The build system fails with newer versions of GNU Make.
("make@4.2" ,gnu-make-4.2)
("unzip" ,unzip)
("which" ,which)