diff mbox series

[bug#68261,v2,2/2] build/cargo-build-system: Support 16k page sizes on aarch64.

Message ID d8664f2c5a8119ef69fc0a5f7a42c362a6f3b871.1704461315.git.roman@burningswell.com
State New
Headers show
Series [bug#68261,v2,1/2] gnu: jemalloc: Build with large page size. | expand

Commit Message

Roman Scherer Jan. 5, 2024, 1:30 p.m. UTC
* guix/build/cargo-build-system.scm (configure): Support 16k page sizes on aarch64.

Change-Id: I523c192159908483577301da246d75d16b694bc8
---
 guix/build/cargo-build-system.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/guix/build/cargo-build-system.scm b/guix/build/cargo-build-system.scm
index ffb2ec898e..c5c2299a4c 100644
--- a/guix/build/cargo-build-system.scm
+++ b/guix/build/cargo-build-system.scm
@@ -119,7 +119,7 @@  (define* (check-for-pregenerated-files #:rest _)
       (error "Possible pre-generated files found:" pregenerated-files))))
 
 (define* (configure #:key inputs
-                    target
+                    target system
                     (vendor-dir "guix-vendor")
                     #:allow-other-keys)
   "Vendor Cargo.toml dependencies as guix inputs."
@@ -178,6 +178,10 @@  (define* (configure #:key inputs
     ;; Prevent targeting the build machine.
     (setenv "CRATE_CC_NO_DEFAULTS" "1"))
 
+  ;; Support 16k kernel page sizes on aarch64 with jemalloc.
+  (when (string-prefix? "aarch64" (or target system))
+    (setenv "JEMALLOC_SYS_WITH_LG_PAGE" "14"))
+
   ;; Configure cargo to actually use this new directory with all the crates.
   (setenv "CARGO_HOME" (string-append (getcwd) "/.cargo"))
   (mkdir-p ".cargo")