unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 73413@debbugs.gnu.org
Cc: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Subject: [bug#73413] [PATCH 3/3] gnu: cling: Reduce closure by 236 MiB.
Date: Sun, 22 Sep 2024 01:32:27 +0900	[thread overview]
Message-ID: <3ec7cbd413a763246fbde7e6a42e1a4425922acd.1726935737.git.maxim.cournoyer@gmail.com> (raw)
In-Reply-To: <cover.1726935737.git.maxim.cournoyer@gmail.com>

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 --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))
-- 
2.46.0





      parent reply	other threads:[~2024-09-21 16:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-21 16:23 [bug#73413] [PATCH 0/3] Update cling to 1.1 and wrap with GCC include paths Maxim Cournoyer
2024-09-21 16:32 ` [bug#73413] [PATCH 1/3] gnu: cling: Wrap " Maxim Cournoyer
2024-09-21 16:32 ` [bug#73413] [PATCH 2/3] gnu: cling: Update to 1.1 Maxim Cournoyer
2024-09-21 16:32 ` Maxim Cournoyer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3ec7cbd413a763246fbde7e6a42e1a4425922acd.1726935737.git.maxim.cournoyer@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=73413@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).