GNU bug report logs - #75097
[PATCH rust-team 1/8] gnu: override-jemalloc: Add variable.

Previous Next

Package: guix-patches;

Reported by: Herman Rimm <herman <at> rimm.ee>

Date: Wed, 25 Dec 2024 20:22:01 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Herman Rimm <herman <at> rimm.ee>
To: 75097 <at> debbugs.gnu.org
Cc: Efraim Flashner <efraim <at> flashner.co.il>
Subject: [bug#75097] [PATCH rust-team 1/8] gnu: override-jemalloc: Add variable.
Date: Wed, 25 Dec 2024 21:20:20 +0100
* gnu/packages/crates-io.scm (override-jemalloc): Add variable.

Change-Id: I3e1666306c9f005072f9ed230f03386b2f78b0b2
---
 gnu/packages/crates-io.scm | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index b3d9bcd783..fb7710c5a9 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -39209,6 +39209,19 @@ (define-public rust-javascriptcore-rs-sys-0.2
      "Sys functions for the Rust bindings of the javacriptcore library.")
     (license license:expat)))
 
+(define override-jemalloc
+  #~(modify-phases %standard-phases
+      (add-after 'configure 'override-jemalloc
+        (lambda* (#:key inputs #:allow-other-keys)
+          ;; This flag is needed when not using the bundled jemalloc.
+          ;; https://github.com/tikv/jemallocator/issues/19
+          (setenv
+            "CARGO_FEATURE_UNPREFIXED_MALLOC_ON_SUPPORTED_PLATFORMS"
+            "1")
+          (setenv "JEMALLOC_OVERRIDE"
+                  (string-append (assoc-ref inputs "jemalloc")
+                                 "/lib/libjemalloc_pic.a"))))))
+
 (define-public rust-jemalloc-ctl-0.5
   (package
     (name "rust-jemalloc-ctl")

base-commit: 32ab343e03e998ada27c063ef7d8a00aa88436dd
-- 
2.45.2





This bug report was last modified 170 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.