From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id OGEzJHqP6F66EgAA0tVLHw (envelope-from ) for ; Tue, 16 Jun 2020 09:23:06 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id eOclIHqP6F7ybAAAbx9fmQ (envelope-from ) for ; Tue, 16 Jun 2020 09:23:06 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4FAA794013C for ; Tue, 16 Jun 2020 09:23:06 +0000 (UTC) Received: from localhost ([::1]:56336 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jl7o9-00045f-7P for larch@yhetil.org; Tue, 16 Jun 2020 05:23:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43148) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jl7nv-00045R-4K for guix-devel@gnu.org; Tue, 16 Jun 2020 05:22:51 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:52707) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jl7nu-00065N-HL; Tue, 16 Jun 2020 05:22:50 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=43796 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jl7nt-0004hx-LM; Tue, 16 Jun 2020 05:22:50 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Pierre Neidhardt Subject: Re: Reducing LLVM closure size References: <87d064slev.fsf@ambrevar.xyz> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 29 Prairial an 228 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 16 Jun 2020 11:22:44 +0200 In-Reply-To: <87d064slev.fsf@ambrevar.xyz> (Pierre Neidhardt's message of "Fri, 12 Jun 2020 11:06:32 +0200") Message-ID: <87zh93wejf.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Spam-Score: -1.01 X-TUID: FwdvIH+Hd71h Hi, Pierre Neidhardt skribis: > For the first 2 links, click on > "View the file list for ..." link at the bottom to display the file > list. > > "bin" and "include" occupy some 35 MiB. First thing we can do is split > > - either move the libs to a "lib" output, > - or move the "bin" and "include" folder to a new output. > > The second approach has the benefit of being less disruptive for dependen= ts. I have a slight preference for a =E2=80=9Clib=E2=80=9D output since that=E2= =80=99s more in line with what we do for other packages. > Now if we look at the PKGBUILD, there are some interesting compilation > flags. If we remove > > "-DBUILD_SHARED_LIBS:BOOL=3DTRUE" > > and add > > "-DLLVM_BUILD_LLVM_DYLIB=3DON" > "-DLLVM_LINK_LLVM_DYLIB=3DON" > > it will produce a single libLLVM-10.so library. This reduces the "lib" > folder size from 107 MiB to 90 MiB. Nice! I looked for something like this when I packaged =E2=80=98clang-tools-extra=E2=80=99 and didn=E2=80=99t find it. This shoul= d go into the next =E2=80=98staging=E2=80=99 branch (or =E2=80=98core-updates=E2=80=99?). > All in all, it looks like we can save 52 MiB out of 140 MiB from the LLVM > package (and 210 MiB from its closure). That=E2=80=99d be great. An additional option would be to have a package with fewer backends by default (currently all of them are enabled and that takes up quite some space). In particular, Mesa doesn=E2=80=99t depend to depend on an LLVM va= riant with 15 backends when it=E2=80=99s only going to use one. Thanks, Ludo=E2=80=99.