guix_mirror_bot pushed a commit to branch gnome-team
in repository guix.

commit bb80bf61856f71e1fc48997fde3a6ce123642db2
Author: Maxim Cournoyer <[email protected]>
AuthorDate: Thu Aug 27 23:13:30 2026 +0900

    gnu: openjdk: Add set-affinity phase.
    
    * gnu/packages/java.scm (openjdk11) [#:phases] {set-affinity}: New phase.
---
 gnu/packages/java.scm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index a8b7a71f189..8e1d73a5fdb 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -1423,6 +1423,14 @@ new Date();"))))
                                "warning: failed to substitute: ~a~%"
                                file))))
                  (find-files "." "\\.c$|\\.h$")))))
+          (add-before 'build 'set-affinity
+            (lambda* (#:key parallel-build? #:allow-other-keys)
+              ;; The java process itself normally uses as many cores as
+              ;; available.
+              (let ((cores (if parallel-build?
+                               (parallel-job-count)
+                               1)))
+                (setaffinity (getpid) (make-bitvector cores #t)))))
           (add-before 'build 'write-source-revision-file
             (lambda _
               (with-output-to-file ".src-rev"

Reply via email to