summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludovic.courtes@inria.fr>2024-09-10 10:33:57 +0200
committerLudovic Courtès <ludo@gnu.org>2024-09-16 10:58:52 +0200
commit3daab044145b4b39fe60c64e89f35e3b2a538935 (patch)
treeda87645b7230359c57f61fef1a30bdfc10b13254
parentf18269421de41174e41a364fb831502ac308c0a5 (diff)
gnu: openpmix: Do not keep a reference to GCC and other build tools.
This reduces the closure of ‘openpmix’ from 297 MiB to 93 MiB. * gnu/packages/parallel.scm (openpmix)[arguments]: Add #:phases and #:disallowed-references. Change-Id: I231c550743e2854e431b8100584bd464695de695
-rw-r--r--gnu/packages/parallel.scm25
1 files changed, 24 insertions, 1 deletions
diff --git a/gnu/packages/parallel.scm b/gnu/packages/parallel.scm
index d5a55a8641c..a77894b8d66 100644
--- a/gnu/packages/parallel.scm
+++ b/gnu/packages/parallel.scm
@@ -52,6 +52,7 @@
52 #:use-module (gnu packages documentation) 52 #:use-module (gnu packages documentation)
53 #:use-module (gnu packages flex) 53 #:use-module (gnu packages flex)
54 #:use-module (gnu packages freeipmi) 54 #:use-module (gnu packages freeipmi)
55 #:use-module (gnu packages gcc)
55 #:use-module (gnu packages libevent) 56 #:use-module (gnu packages libevent)
56 #:use-module (gnu packages linux) 57 #:use-module (gnu packages linux)
57 #:use-module (gnu packages maths) 58 #:use-module (gnu packages maths)
@@ -646,7 +647,29 @@ single-instruction multiple-data (SIMD) intrinsics.")
646 (arguments 647 (arguments
647 (list #:configure-flags 648 (list #:configure-flags
648 #~(list (string-append "--with-hwloc=" 649 #~(list (string-append "--with-hwloc="
649 (ungexp (this-package-input "hwloc") "lib"))))) 650 (ungexp (this-package-input "hwloc") "lib")))
651
652 ;; Don't keep a reference to GCC.
653 #:disallowed-references (and (not (%current-target-system))
654 (list (canonical-package gcc)))
655
656 #:phases
657 #~(modify-phases %standard-phases
658 (add-before 'configure 'strip-pmix-cc-absolute
659 (lambda _
660 ;; The 'pmix_info' program prints the 'configure' command
661 ;; line, compiler absolute file name, etc., which causes it
662 ;; to keep references to many build-time packages. Scrub
663 ;; these.
664 (substitute* "configure"
665 (("PMIX_CC_ABSOLUTE=\"(.*)\"" _ cc)
666 (string-append "PMIX_CC_ABSOLUTE=\"$(basename \""
667 cc "\")\"\n")))))
668 (add-after 'configure 'strip-pmix-config-header
669 (lambda _
670 (substitute* "src/include/pmix_config.h"
671 (("#define PMIX_CONFIGURE_CLI .*")
672 "#define PMIX_CONFIGURE_CLI \"[scrubbed]\"\n")))))))
650 (inputs (list libevent `(,hwloc "lib"))) 673 (inputs (list libevent `(,hwloc "lib")))
651 (native-inputs (list perl python)) 674 (native-inputs (list perl python))
652 (synopsis "PMIx library") 675 (synopsis "PMIx library")