[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
134/201: gnu: llvm: Add make-lld-wrapper, lld-wrapper and lld-as-ld-wrap
From: |
guix-commits |
Subject: |
134/201: gnu: llvm: Add make-lld-wrapper, lld-wrapper and lld-as-ld-wrapper. |
Date: |
Mon, 1 Nov 2021 23:18:59 -0400 (EDT) |
apteryx pushed a commit to branch core-updates-frozen-batched-changes
in repository guix.
commit 201aa89d892efccb257be21794b794d24bac2a81
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")
- 129/201: gnu: libsoup: Update to 3.0.1., (continued)
- 129/201: gnu: libsoup: Update to 3.0.1., guix-commits, 2021/11/01
- 138/201: profiles: Add a gdk-pixbuf-loaders-cache-file hook., guix-commits, 2021/11/01
- 156/201: gnu: python-six-bootstrap: Update to 1.16.0., guix-commits, 2021/11/01
- 160/201: gnu: mesa: Replace obsolete vulkan-overlay-layer build option., guix-commits, 2021/11/01
- 192/201: gnu: Add python-dotenv., guix-commits, 2021/11/01
- 198/201: gnu: ansible: Update to 4.7.0., guix-commits, 2021/11/01
- 179/201: gnu: Add polkit-duktape., guix-commits, 2021/11/01
- 61/201: gnu: gst-plugins-base: Update to 1.18.5., guix-commits, 2021/11/01
- 72/201: gnu: libnice: Update to 0.1.18-0.47a9633 and disable test-bind test., guix-commits, 2021/11/01
- 121/201: gnu: util-linux: Globally disable the lsns test., guix-commits, 2021/11/01
- 134/201: gnu: llvm: Add make-lld-wrapper, lld-wrapper and lld-as-ld-wrapper.,
guix-commits <=
- 145/201: gnu: mariadb: Only run the main test suite to avoid flaky tests., guix-commits, 2021/11/01
- 142/201: gnu: gawk: Use regular bash to cope with test suite failures., guix-commits, 2021/11/01
- 150/201: gnu: curl: Update to 7.79.1., guix-commits, 2021/11/01
- 152/201: gnu: python-dbus: Update to 1.2.18., guix-commits, 2021/11/01
- 164/201: gnu: gdb: Update to 11.1 and remove gdb-9.2., guix-commits, 2021/11/01
- 167/201: gnu: python-lit: Update to 12.0.1., guix-commits, 2021/11/01
- 175/201: gnu: xorgproto: Update to 2021.5., guix-commits, 2021/11/01
- 174/201: gnu: xkeyboard-config: Update to 2.34., guix-commits, 2021/11/01
- 178/201: gnu: duktape: Install a pkg-config file., guix-commits, 2021/11/01
- 119/201: gnu: openssl: Absorb 1.1.1l graft., guix-commits, 2021/11/01