[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
134/142: gnu: llvm: Add make-lld-wrapper, lld-wrapper and lld-as-ld-wrap
From: |
guix-commits |
Subject: |
134/142: gnu: llvm: Add make-lld-wrapper, lld-wrapper and lld-as-ld-wrapper. |
Date: |
Wed, 20 Oct 2021 14:57:02 -0400 (EDT) |
apteryx pushed a commit to branch core-updates-frozen-batched-changes
in repository guix.
commit ad2d1c5b5c0fdcb5aedbbc2dfea6f802364e521d
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Sun Oct 17 22:41:01 2021 -0400
gnu: llvm: Add make-lld-wrapper, lld-wrapper and lld-as-ld-wrapper.
* gnu/packages/llvm.scm (make-lld-wrapper): New procedure.
(lld-wrapper, lld-as-ld-wrapper): New variables.
---
gnu/packages/llvm.scm | 40 ++++++++++++++++++++++++++++++++++++++--
1 file changed, 38 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 6403176..0249442 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -16,8 +16,8 @@
;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
-;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
+;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2021 Lars-Dominik Braun <lars@6xq.net>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
@@ -67,7 +67,8 @@
#:use-module (gnu packages python)
#:use-module (gnu packages swig)
#:use-module (gnu packages xml)
- #:export (system->llvm-target))
+ #:export (make-lld-wrapper
+ system->llvm-target))
(define* (system->llvm-target #:optional
(system (or (and=> (%current-target-system)
@@ -991,6 +992,41 @@ of programming tools as well as libraries with equivalent
functionality.")
components which highly leverage existing libraries in the larger LLVM
Project.")
(license license:asl2.0))) ; With LLVM exception
+;;; A lld wrapper that inserts appropriate -rpath entries. Sufficient to use
+;;; with Clang or when specifying -fuse-ld with GCC.
+(define* (make-lld-wrapper lld #:key lld-as-ld?)
+ "Return a LLD wrapper. When LLD-AS-LD? is true, create a 'ld' symlink that
+points to 'lld'."
+ (computed-file
+ (if lld-as-ld?
+ "lld-as-ld-wrapper"
+ "lld-wrapper")
+ #~(let ((ld.lld-wrapper (string-append #$(make-ld-wrapper "ld.lld-wrapper"
+ #:binutils lld
+ #:linker "ld.lld")
+ "/bin/ld.lld"))
+ (lld-wrapper (string-append #$(make-ld-wrapper "lld-wrapper"
+ #:binutils lld
+ #:linker "lld")
+ "/bin/lld")))
+ (mkdir #$output)
+ (mkdir (string-append #$output "/bin"))
+ (symlink ld.lld-wrapper (string-append #$output "/bin/ld.lld"))
+ (symlink lld-wrapper (string-append #$output "/bin/lld"))
+ (when #$lld-as-ld?
+ (symlink ld.lld-wrapper (string-append #$output "/bin/ld"))))))
+
+;;; FIXME: The following aliases are defined as promises since there seems to
+;;; be a problem with using `make-ld-wrapper' at the top level.
+
+;;; A lld wrapper suitable to use with -fuse-ld and GCC or with Clang.
+(define-public lld-wrapper
+ (delay (make-lld-wrapper lld)))
+
+;;; A lld wrapper that can be used as a (near) drop-in replacement to GNU ld.
+(define-public lld-as-ld-wrapper
+ (delay (make-lld-wrapper lld #:lld-as-ld? #t)))
+
(define-public lldb
(package
(name "lldb")
- 130/142: gnu: webkitgtk: Update to 2.34.0., (continued)
- 130/142: gnu: webkitgtk: Update to 2.34.0., guix-commits, 2021/10/20
- 129/142: gnu: libsoup: Update to 3.0.1., guix-commits, 2021/10/20
- 135/142: gnu: ungoogled-chromium: Use the new lld-as-ld-wrapper., guix-commits, 2021/10/20
- 43/142: gnu: zxing-cpp: Update to 1.2.0., guix-commits, 2021/10/20
- 62/142: gnu: gst-plugins-good: Update to 1.18.5., guix-commits, 2021/10/20
- 137/142: build: glib-or-gtk: Generate the gdk-pixbuf-loaders cache file in a phase., guix-commits, 2021/10/20
- 98/142: gnu: Add python-tomli., guix-commits, 2021/10/20
- 86/142: gnu: gdb: Patch references to /bin/sh and add debug output., guix-commits, 2021/10/20
- 93/142: gnu: Build all Rust packages using the latest rustc., guix-commits, 2021/10/20
- 133/142: gnu: python-flit: Update to 3.3.0., guix-commits, 2021/10/20
- 134/142: gnu: llvm: Add make-lld-wrapper, lld-wrapper and lld-as-ld-wrapper.,
guix-commits <=
- 120/142: gnu: mit-krb5: Absorb 1.19.2 graft., guix-commits, 2021/10/20
- 123/142: gnu: pango: Update to 1.48.10., guix-commits, 2021/10/20
- 122/142: gnu: heimdal: Fix build., guix-commits, 2021/10/20
- 125/142: gnu: glib: Update to 2.70, specify a bindir prefix and hide package., guix-commits, 2021/10/20
- 131/142: gnu: pulseaudio: Add doxygen to fix build., guix-commits, 2021/10/20
- 140/142: gnu: gtk: Deprecate gdk-pixbuf+svg in favor of librsvg., guix-commits, 2021/10/20
- 142/142: gnu: elogind: Update to 246.10., guix-commits, 2021/10/20
- 138/142: profiles: Add a gdk-pixbuf-loaders-cache-file hook., guix-commits, 2021/10/20
- 20/142: gnu: gst-plugins-base: Update to 1.18.4., guix-commits, 2021/10/20