[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
134/140: gnu: llvm: Add make-lld-wrapper, lld-wrapper and lld-as-ld-wrap
From: |
guix-commits |
Subject: |
134/140: gnu: llvm: Add make-lld-wrapper, lld-wrapper and lld-as-ld-wrapper. |
Date: |
Sun, 17 Oct 2021 23:11:17 -0400 (EDT) |
apteryx pushed a commit to branch core-updates-frozen-batched-changes
in repository guix.
commit 5f270c61ec5f64b8c8591fb9706c847dece8f78d
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 | 36 ++++++++++++++++++++++++++++++++++--
1 file changed, 34 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 6403176..6930479 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,37 @@ 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
+ "lld-wrapper"
+ #~(begin
+ (define lld* (string-append #$(make-ld-wrapper "lld-wrapper-0"
+ #:binutils lld
+ #:linker "lld")
+ "/bin/lld"))
+ (mkdir #$output)
+ (mkdir (string-append #$output "/bin"))
+ (symlink lld* (string-append #$output "/bin/lld"))
+ ;; Clang looks for an 'ld.lld' executable.
+ (symlink lld* (string-append #$output "/bin/ld.lld"))
+ (when #$lld-as-ld?
+ (symlink lld* (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")
- 116/140: gnu: mesa: Update to 21.2.4., (continued)
- 116/140: gnu: mesa: Update to 21.2.4., guix-commits, 2021/10/17
- 114/140: gnu: rest: Use libsoup-minimal., guix-commits, 2021/10/17
- 115/140: gnu: inkscape: Remove the legacy 0.92 version., guix-commits, 2021/10/17
- 117/140: gnu: graphviz: Update to 2.49.0., guix-commits, 2021/10/17
- 120/140: gnu: mit-krb5: Absorb 1.19.2 graft., guix-commits, 2021/10/17
- 126/140: gnu: glib-networking: Update to 2.70.rc., guix-commits, 2021/10/17
- 124/140: gnu: libthai: Make datrie a normal native-input., guix-commits, 2021/10/17
- 123/140: gnu: pango: Update to 1.48.10., guix-commits, 2021/10/17
- 132/140: gnu: webkitgtk: Add a debug output., guix-commits, 2021/10/17
- 130/140: gnu: webkitgtk: Update to 2.34.0., guix-commits, 2021/10/17
- 134/140: gnu: llvm: Add make-lld-wrapper, lld-wrapper and lld-as-ld-wrapper.,
guix-commits <=
- 131/140: gnu: pulseaudio: Add doxygen to fix build., guix-commits, 2021/10/17
- 139/140: gnu: gdk-pixbuf: Add a search path for the loaders cache file., guix-commits, 2021/10/17
- 122/140: gnu: heimdal: Fix build., guix-commits, 2021/10/17
- 136/140: gnu: gtk: Add the generate-gdk-pixbuf-loaders-cache-file phase., guix-commits, 2021/10/17
- 138/140: profiles: Add a gdk-pixbuf-loaders-cache-file hook., guix-commits, 2021/10/17
- 140/140: gnu: gtk: Deprecate gdk-pixbuf+svg in favor of librsvg., guix-commits, 2021/10/17
- 125/140: gnu: glib: Update to 2.70, specify a bindir prefix and hide package., guix-commits, 2021/10/17
- 127/140: gnu: vala: Update to 0.54.2., guix-commits, 2021/10/17