guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

05/06: gnu: openjdk11: Build in parallel.


From: guix-commits
Subject: 05/06: gnu: openjdk11: Build in parallel.
Date: Fri, 15 May 2020 07:09:20 -0400 (EDT)

rekado pushed a commit to branch master
in repository guix.

commit 7b82e1cdbed4c3a44ecbb99f754580a9e6a1b0ae
Author: Ricardo Wurmus <address@hidden>
AuthorDate: Fri May 15 00:15:25 2020 +0200

    gnu: openjdk11: Build in parallel.
    
    * gnu/packages/java.scm (openjdk11)[arguments]: Remove #:parallel-build?,
     #:parallel-tests?, and #:make-flags options; add
    "write-source-revision-file"; replace "build" phase; do not set
    GUIX_LD_WRAPPER_ALLOW_IMPURITIES; pass JOBS variable to make in "build" and
    "build-jre" phases.
---
 gnu/packages/java.scm | 28 ++++++++++++++++------------
 1 file changed, 16 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index f76dfc8..d74f0af 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -2013,11 +2013,6 @@ new Date();"))
         ,@%gnu-build-system-modules)
        #:tests? #f; requires jtreg
        ;; TODO package jtreg
-       ;; disable parallel builds, as the openjdk build system does not like -j
-       #:parallel-build? #f
-       #:parallel-tests? #f
-       ;; reenable parallel builds and tests by adding the flags manually
-       #:make-flags (list (string-append "JOBS=" (number->string 
(parallel-job-count))))
        #:configure-flags
        `("--disable-option-checking" ; --enable-fast-install default flag 
errors otherwise
          "--disable-warnings-as-errors"
@@ -2034,7 +2029,6 @@ new Date();"))
                          (assoc-ref %build-inputs "freetype") "/include")
          ,(string-append "--with-freetype-lib="
                          (assoc-ref %build-inputs "freetype") "/lib"))
-       ;; TODO
        #:phases
        (modify-phases %standard-phases
          (add-after 'patch-source-shebangs 'fix-java-shebangs
@@ -2044,22 +2038,32 @@ new Date();"))
              (substitute* 
"make/data/blacklistedcertsconverter/blacklisted.certs.pem"
                (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
              #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 parallel-build? make-flags #:allow-other-keys)
+             (apply invoke "make" "all"
+                    `(,@(if parallel-build?
+                            (list (string-append "JOBS="
+                                                 (number->string 
(parallel-job-count))))
+                            '())
+                      ,@make-flags))))
          ;; jdk 11 does not build jre by default any more
          ;; building it anyways
          ;; for further information see:
          ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
          (add-after 'build 'build-jre
-           (lambda _
-             (invoke "make" "legacy-jre-image")
-             #t))
+           (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
+             (apply invoke "make" "legacy-jre-image"
+                    `(,@(if parallel-build?
+                            (list (string-append "JOBS="
+                                                 (number->string 
(parallel-job-count))))
+                            '())
+                      ,@make-flags))))
          (replace 'install
            (lambda* (#:key outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out"))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]