[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
134/227: gnu: llvm: Add make-lld-wrapper, lld-wrapper and lld-as-ld-wrap
From: |
guix-commits |
Subject: |
134/227: gnu: llvm: Add make-lld-wrapper, lld-wrapper and lld-as-ld-wrapper. |
Date: |
Thu, 11 Nov 2021 12:30:24 -0500 (EST) |
apteryx pushed a commit to branch core-updates-frozen
in repository guix.
commit daa46cd151657ac4df991bf6651d46aae739fcef
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 | 47 +++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 45 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 6403176..16fe6fc 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,48 @@ 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
+(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'."
+ (package
+ (name (if lld-as-ld? "lld-as-ld-wrapper" "lld-wrapper"))
+ (version "0")
+ (source #f)
+ (build-system trivial-build-system)
+ (inputs `(("ld.lld-wrapper" ,(make-ld-wrapper "ld.lld-wrapper"
+ #:binutils lld
+ #:linker "ld.lld"))
+ ("lld-wrapper" ,(make-ld-wrapper "lld-wrapper"
+ #:binutils lld
+ #:linker "lld"))))
+ (arguments
+ (list #:builder
+ #~(let ((ld.lld (string-append #$(this-package-input
+ "ld.lld-wrapper")
+ "/bin/ld.lld"))
+ (lld (string-append #$(this-package-input "lld-wrapper")
+ "/bin/lld")))
+ (mkdir #$output)
+ (mkdir (string-append #$output "/bin"))
+ (symlink ld.lld (string-append #$output "/bin/ld.lld"))
+ (symlink lld (string-append #$output "/bin/lld"))
+ (when #$lld-as-ld?
+ (symlink ld.lld (string-append #$output "/bin/ld"))))))
+ (synopsis "LLD linker wrapper")
+ (description "This is a linker wrapper for LLD; like @code{ld-wrapper}, it
+wraps the linker to add any missing @code{-rpath} flags, and to detect any
+misuse of libraries outside of the store.")
+ (home-page "https://www.gnu.org/software/guix/")
+ (license license:gpl3+)))
+
+;;; A LLD wrapper suitable to use with -fuse-ld and GCC or with Clang.
+(define-public lld-wrapper
+ (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
+ (make-lld-wrapper lld #:lld-as-ld? #t))
+
(define-public lldb
(package
(name "lldb")
- 100/227: gnu: python-pytest-6: Fix version via setuptools-scm., (continued)
- 100/227: gnu: python-pytest-6: Fix version via setuptools-scm., guix-commits, 2021/11/11
- 97/227: gnu: Add python-flit-core., guix-commits, 2021/11/11
- 102/227: gnu: meson: Patch to allow installing to independent prefixes., guix-commits, 2021/11/11
- 104/227: build: glib-or-gtk-build-system: Fix indentation., guix-commits, 2021/11/11
- 108/227: gnu: lsof: Fix indentation., guix-commits, 2021/11/11
- 110/227: gnu: Add docbook-xsl-ns., guix-commits, 2021/11/11
- 111/227: gnu: colord-minimal: Introduce minimal variant., guix-commits, 2021/11/11
- 113/227: gnu: gusb-minimal: Introduce minimal variant., guix-commits, 2021/11/11
- 121/227: gnu: util-linux: Globally disable the lsns test., guix-commits, 2021/11/11
- 131/227: gnu: pulseaudio: Add doxygen to fix build., guix-commits, 2021/11/11
- 134/227: gnu: llvm: Add make-lld-wrapper, lld-wrapper and lld-as-ld-wrapper.,
guix-commits <=
- 117/227: gnu: graphviz: Update to 2.49.0., guix-commits, 2021/11/11
- 119/227: gnu: openssl: Absorb 1.1.1l graft., guix-commits, 2021/11/11
- 125/227: gnu: glib: Update to 2.70, specify a bindir prefix and hide package., guix-commits, 2021/11/11
- 132/227: gnu: webkitgtk: Add a debug output., guix-commits, 2021/11/11
- 157/227: gnu: python-dateutil: Update to 2.8.2., guix-commits, 2021/11/11
- 116/227: gnu: mesa: Update to 21.2.4., guix-commits, 2021/11/11
- 129/227: gnu: libsoup: Update to 3.0.1., guix-commits, 2021/11/11
- 120/227: gnu: mit-krb5: Absorb 1.19.2 graft., guix-commits, 2021/11/11
- 138/227: profiles: Add a gdk-pixbuf-loaders-cache-file hook., guix-commits, 2021/11/11
- 141/227: gnu: librsvg: Preserve the loaders.cache file., guix-commits, 2021/11/11