[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
134/217: gnu: llvm: Add make-lld-wrapper, lld-wrapper and lld-as-ld-wrap
From: |
guix-commits |
Subject: |
134/217: gnu: llvm: Add make-lld-wrapper, lld-wrapper and lld-as-ld-wrapper. |
Date: |
Sun, 14 Nov 2021 19:21:04 -0500 (EST) |
vagrantc pushed a commit to branch core-updates-frozen-batched-changes
in repository guix.
commit 81dbf597747476d4ff5caa971ce26deabffdd608
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")
- 99/217: gnu: python-setuptools-scm: Update to 6.3.2, (continued)
- 99/217: gnu: python-setuptools-scm: Update to 6.3.2, guix-commits, 2021/11/14
- 102/217: gnu: meson: Patch to allow installing to independent prefixes., guix-commits, 2021/11/14
- 101/217: gnu: python-pathlib2: Update to 2.3.6., guix-commits, 2021/11/14
- 111/217: gnu: colord-minimal: Introduce minimal variant., guix-commits, 2021/11/14
- 116/217: gnu: mesa: Update to 21.2.4., guix-commits, 2021/11/14
- 128/217: gnu: libsoup: Reverse inheritance relationship with libsoup-minimal., guix-commits, 2021/11/14
- 132/217: gnu: webkitgtk: Add a debug output., guix-commits, 2021/11/14
- 129/217: gnu: libsoup: Update to 3.0.1., guix-commits, 2021/11/14
- 130/217: gnu: webkitgtk: Use libsoup 3 and build with GCC., guix-commits, 2021/11/14
- 131/217: gnu: pulseaudio: Add doxygen to fix build., guix-commits, 2021/11/14
- 134/217: gnu: llvm: Add make-lld-wrapper, lld-wrapper and lld-as-ld-wrapper.,
guix-commits <=
- 139/217: gnu: gdk-pixbuf: Add a search path for the loaders cache file., guix-commits, 2021/11/14
- 147/217: gnu: nss: Update to 3.71., guix-commits, 2021/11/14
- 145/217: gnu: mariadb: Only run the main test suite to avoid flaky tests., guix-commits, 2021/11/14
- 151/217: gnu: python-hypothesis: Update to 6.23.4., guix-commits, 2021/11/14
- 153/217: gnu: boost: Update to 1.77.0., guix-commits, 2021/11/14
- 156/217: gnu: python-six-bootstrap: Update to 1.16.0., guix-commits, 2021/11/14
- 161/217: gnu: mesa: Enable support for OpenGL ES 1.1 and 2.0., guix-commits, 2021/11/14
- 165/217: gnu: ldc: Update to 1.27.1., guix-commits, 2021/11/14
- 173/217: gnu: tracker: Use libsoup-minimal-2 to fix build., guix-commits, 2021/11/14
- 176/217: gnu: Add libxcvt., guix-commits, 2021/11/14