aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2024-09-21 16:04:38 +0000
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2024-10-06 16:20:22 +0000
commitab424da401e2a57dfb83761ea2a59bb1df3be94b (patch)
tree955f2623e432e88939aa639544fc695c77a7b574
parent866fc620b3dbe160c8d0ed4e77ed18515f2ce6fb (diff)
downloadguix-ab424da401e2a57dfb83761ea2a59bb1df3be94b.tar
guix-ab424da401e2a57dfb83761ea2a59bb1df3be94b.tar.gz
guix-ab424da401e2a57dfb83761ea2a59bb1df3be94b.tar.bz2
guix-ab424da401e2a57dfb83761ea2a59bb1df3be94b.tar.lz
guix-ab424da401e2a57dfb83761ea2a59bb1df3be94b.tar.xz
guix-ab424da401e2a57dfb83761ea2a59bb1df3be94b.tar.zst
guix-ab424da401e2a57dfb83761ea2a59bb1df3be94b.zip
gnu: cling: Reduce closure by 236 MiB.
This is accomplished by building LLVM only for the host target. * gnu/packages/llvm.scm (llvm-cling) [configure-flags]: Add '-DLLVM_TARGETS_TO_BUILD=host;NVPTX'. Cover-letter: Update cling to 1.1 and wrap with GCC include paths This series does two things: 1. Update the cling package and its related inputs 2. Fix cling crashing when wrong or missing GCC includes were not provided. Cling is built to use the specific GCC version it knows from at build time; the headers available should match that version. Wrapping cling with the gcc-toolchain ones ensures it works correctly out of the box, without the user having to know to manually match the right GCC (such as in 'guix shell cling gcc-toolchain@11'). END Change-Id: Ib24d3b692070e6de9ad4aa558918786d9e25379d
-rw-r--r--gnu/packages/llvm.scm9
1 files changed, 8 insertions, 1 deletions
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 6da977fea1..9f851a478e 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -2306,7 +2306,14 @@ LLVM bitcode files.")
(file-name (git-file-name "llvm-cling" version))
(sha256
(base32
- "05libb4mc385n8sq0bilalvidwzzrcyiqsfkn7j179kkx66a8rzy")))))))
+ "05libb4mc385n8sq0bilalvidwzzrcyiqsfkn7j179kkx66a8rzy"))))
+ (arguments
+ ;; This reduces the package size on disk from 547 MiB to 311 MiB.
+ ;; Cling is intended to be used as a REPL on the host machine, not as a
+ ;; cross-compiling toolchain.
+ (substitute-keyword-arguments (package-arguments base)
+ ((#:configure-flags cf ''())
+ #~(cons* "-DLLVM_TARGETS_TO_BUILD=host;NVPTX" #$cf)))))))
(define clang-cling-runtime
(let ((base clang-runtime-16))