[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/07: gnu: clang: Build and link as shared libraries.
From: |
guix-commits |
Subject: |
06/07: gnu: clang: Build and link as shared libraries. |
Date: |
Wed, 16 Feb 2022 10:55:42 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 35ea49daf6cdef5bf6156dd90add77cede364a4b
Author: Greg Hogan <code@greghogan.com>
AuthorDate: Tue Feb 8 18:32:29 2022 +0000
gnu: clang: Build and link as shared libraries.
Fixes <https://issues.guix.gnu.org/52054>.
* gnu/packages/llvm.scm (clang)[arguments]<#:phases>:
Remove the separate "extra" output and build the main package and
clang-tools-extras with shared library linkage.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
gnu/packages/llvm.scm | 54 +++------------------------------------------------
1 file changed, 3 insertions(+), 51 deletions(-)
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index b6d52402a8..eb949bed1b 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -188,7 +188,6 @@ given PATCHES. When TOOLS-EXTRA is given, it must point to
the
;; doesn't seem to be any way to do this with clang's autotools-based
;; build system.
(build-system cmake-build-system)
- (outputs (if tools-extra '("out" "extra") '("out")))
(native-inputs (package-native-inputs llvm))
(inputs
`(("libxml2" ,libxml2)
@@ -229,56 +228,9 @@ given PATCHES. When TOOLS-EXTRA is given, it must point
to the
(string-delete #\-
(package-version llvm))
".src")
"tools/extra")
- #t)))
- (add-after 'install 'move-extra-tools
- (lambda* (#:key outputs #:allow-other-keys)
- ;; Move the extra tools to the "extra" output.
- ;; These programs alone weigh in at 296 MiB,
- ;; because they statically-link a whole bunch of
- ;; Clang libraries.
- (let* ((out (assoc-ref outputs "out"))
- (extra (assoc-ref outputs "extra"))
- (bin (string-append out "/bin"))
- (bin* (string-append extra "/bin"))
- (lib (string-append out "/lib")))
- (define (move program)
- (rename-file (string-append bin "/" program)
- (string-append bin* "/"
- program)))
-
- (mkdir-p bin*)
- (for-each move
- '("clang-apply-replacements"
- "clang-change-namespace"
- "clangd"
- "clang-doc"
- "clang-include-fixer"
- "clang-move"
- "clang-query"
- "clang-reorder-fields"
- "clang-tidy"
- "find-all-symbols"
- "modularize"
- "pp-trace"))
-
- ;; Remove MiBs of .a files coming from
- ;; 'clang-tools-extra'.
- (for-each (lambda (component)
- (delete-file
- (string-append lib "/libclang"
- component ".a")))
- '("ApplyReplacements"
- "ChangeNamespace"
- "Daemon"
- "DaemonTweaks"
- "Doc"
- "IncludeFixer"
- "IncludeFixerPlugin"
- "Move"))
- (for-each delete-file
- (find-files
- lib
-
"^(libfindAllSymbols|libclangTidy)"))
+ ;; Build and link to shared libraries.
+ (substitute* "cmake/modules/AddClang.cmake"
+ (("BUILD_SHARED_LIBS") "True"))
#t))))
'())
(add-after 'unpack 'add-missing-triplets
- branch master updated (176354c2f8 -> 6481dbda51), guix-commits, 2022/02/16
- 01/07: gexp: Preserve source location for #~ and #$ read extensions., guix-commits, 2022/02/16
- 04/07: status: Use bold more sparsely at -v1., guix-commits, 2022/02/16
- 07/07: gnu: c-vise: Fix linkage., guix-commits, 2022/02/16
- 03/07: status: Do not print .drv file names for grafts., guix-commits, 2022/02/16
- 02/07: doc: Document 'wrap-program' and 'wrap-script'., guix-commits, 2022/02/16
- 05/07: status: Do not pass a non-literal format string to 'format'., guix-commits, 2022/02/16
- 06/07: gnu: clang: Build and link as shared libraries.,
guix-commits <=