build-system/dub: Use the gold linker.
* guix/build-system/dub.scm (default-ld-gold-wrapper): New procedure. (lower): Add a LD-GOLD-WRAPPER to the keyword arguments, and to the resulting bag's… [build-inputs]: …build inputs. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>master
parent
c539a13050
commit
c67ea330d4
|
@ -51,6 +51,13 @@
|
||||||
(let ((pkg-config (resolve-interface '(gnu packages pkg-config))))
|
(let ((pkg-config (resolve-interface '(gnu packages pkg-config))))
|
||||||
(module-ref pkg-config 'pkg-config)))
|
(module-ref pkg-config 'pkg-config)))
|
||||||
|
|
||||||
|
(define (default-ld-gold-wrapper)
|
||||||
|
"Return the default ld-gold-wrapper package."
|
||||||
|
;; LDC doesn't work with Guix's default (BFD) linker.
|
||||||
|
;; Lazily resolve the binding to avoid a circular dependency.
|
||||||
|
(let ((commencement (resolve-interface '(gnu packages commencement))))
|
||||||
|
(module-ref commencement 'ld-gold-wrapper)))
|
||||||
|
|
||||||
(define %dub-build-system-modules
|
(define %dub-build-system-modules
|
||||||
;; Build-side modules imported by default.
|
;; Build-side modules imported by default.
|
||||||
`((guix build dub-build-system)
|
`((guix build dub-build-system)
|
||||||
|
@ -100,6 +107,7 @@
|
||||||
(ldc (default-ldc))
|
(ldc (default-ldc))
|
||||||
(dub (default-dub))
|
(dub (default-dub))
|
||||||
(pkg-config (default-pkg-config))
|
(pkg-config (default-pkg-config))
|
||||||
|
(ld-gold-wrapper (default-ld-gold-wrapper))
|
||||||
#:allow-other-keys
|
#:allow-other-keys
|
||||||
#:rest arguments)
|
#:rest arguments)
|
||||||
"Return a bag for NAME."
|
"Return a bag for NAME."
|
||||||
|
@ -121,6 +129,7 @@
|
||||||
,@(standard-packages)))
|
,@(standard-packages)))
|
||||||
(build-inputs `(("ldc" ,ldc)
|
(build-inputs `(("ldc" ,ldc)
|
||||||
("dub" ,dub)
|
("dub" ,dub)
|
||||||
|
("ld-gold-wrapper" ,ld-gold-wrapper)
|
||||||
,@native-inputs))
|
,@native-inputs))
|
||||||
(outputs outputs)
|
(outputs outputs)
|
||||||
(build dub-build)
|
(build dub-build)
|
||||||
|
|
Reference in New Issue