aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/mold.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2024-09-29 21:15:45 +0300
committerEfraim Flashner <efraim@flashner.co.il>2024-09-29 21:17:13 +0300
commitf653a07bb893b028fdbfa2f46f486fcda6731d70 (patch)
treedcd8bb0417bcaab2c725e2be0282420743ab77dd /gnu/packages/mold.scm
parent093f2fb8722fafcc7c1555cd845289096849f4a2 (diff)
downloadguix-f653a07bb893b028fdbfa2f46f486fcda6731d70.tar.gz
guix-f653a07bb893b028fdbfa2f46f486fcda6731d70.zip
gnu: mold: Only build with mimalloc on 64-bit systems.
* gnu/packages/mold.scm (mold)[arguments]: Adjust the configure-flags to only use mimalloc on 64-bit systems. [inputs]: Only add mimalloc when building for a 64-bit system. Change-Id: I7fc8eed076072ccb49f180adbfb12683ae169eca
Diffstat (limited to 'gnu/packages/mold.scm')
-rw-r--r--gnu/packages/mold.scm15
1 files changed, 12 insertions, 3 deletions
diff --git a/gnu/packages/mold.scm b/gnu/packages/mold.scm
index d2534de6a1..fb669ec88e 100644
--- a/gnu/packages/mold.scm
+++ b/gnu/packages/mold.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2023 Zhu Zihao <all_but_last@163.com>
-;;; Copyright © 2023 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2023, 2024 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -55,7 +55,11 @@
(build-system cmake-build-system)
(arguments
(list
- #:configure-flags #~(list "-DMOLD_USE_SYSTEM_MIMALLOC=ON"
+ ;; Mold only uses mimalloc on 64-bit systems, even with the
+ ;; configure flag set, saying it is unstable on 32-bit systems.
+ #:configure-flags #~(list #$@(if (target-64bit?)
+ '("-DMOLD_USE_SYSTEM_MIMALLOC=ON")
+ '("-DMOLD_USE_MIMALLOC=OFF"))
"-DMOLD_USE_SYSTEM_TBB=ON"
"-DBUILD_TESTING=ON")
#:phases
@@ -81,7 +85,12 @@
;; but compiler in Guix will insert the path of gcc-lib and
;; glibc into the output binary.
(delete-file "test/rpath.sh"))))))
- (inputs (list mimalloc tbb xxhash zlib `(,zstd "lib")))
+ (inputs
+ (append
+ (if (target-64bit?)
+ (list mimalloc)
+ '())
+ (list tbb xxhash zlib `(,zstd "lib"))))
(home-page "https://github.com/rui314/mold")
(synopsis "Fast linker")
(description