diff mbox series

[bug#73413,3/3] gnu: cling: Reduce closure by 236 MiB.

Message ID 3ec7cbd413a763246fbde7e6a42e1a4425922acd.1726935737.git.maxim.cournoyer@gmail.com
State New
Headers show
Series Update cling to 1.1 and wrap with GCC include paths | expand

Commit Message

Maxim Cournoyer Sept. 21, 2024, 4:32 p.m. UTC
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'.

Change-Id: Ib24d3b692070e6de9ad4aa558918786d9e25379d
---

 gnu/packages/llvm.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index bdd805c59f..2e8d4e46dd 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -2306,7 +2306,14 @@  (define llvm-cling
          (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))