From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34140) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFHn7-0003Ud-6x for guix-patches@gnu.org; Thu, 16 Nov 2017 05:53:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eFHn4-00057E-4w for guix-patches@gnu.org; Thu, 16 Nov 2017 05:53:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:33976) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eFHn4-00056r-1E for guix-patches@gnu.org; Thu, 16 Nov 2017 05:53:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eFHn3-0001tT-PA for guix-patches@gnu.org; Thu, 16 Nov 2017 05:53:01 -0500 Subject: [bug#29299] [PATCH] build-system/go: Don't let Go executables refer to the Go compiler. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <5669d4a6fba88e2dd1e048fd2ba292cf5a7c8d15.1510678556.git.leo@famulari.name> Date: Thu, 16 Nov 2017 11:52:55 +0100 In-Reply-To: <5669d4a6fba88e2dd1e048fd2ba292cf5a7c8d15.1510678556.git.leo@famulari.name> (Leo Famulari's message of "Tue, 14 Nov 2017 12:00:36 -0500") Message-ID: <87shdefqbc.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Leo Famulari Cc: 29299@debbugs.gnu.org Hello, Leo Famulari skribis: > This is a naive adaptation of ((guix build utils) > remove-store-references).=20 > > It takes ~55 seconds to remove the references from Syncthing's > executables (96 MiB) on an SSD. Any ideas about how to speed it up? > > * guix/build/go-build-system.scm (remove-store-reference, remove-go-refer= ences): > New variables. > (%standard-phases): Add 'remove-go-references' phase. > * guix/build/go.scm (go-build): Add allow-go-reference? key. [...] > +(define* (remove-store-reference file file-name > + #:optional (store (%store-directory))) > + "Remove from FILE occurrences of FILE-NAME in STORE; return #t when FI= LE-NAME > +is encountered in FILE, #f otherwise." Maybe leave a note about the optimization opportunity. > +(define* (remove-go-references #:key allow-go-reference? > + inputs outputs #:allow-other-keys) > + "Remove any references to the Go compiler from the compiled Go executa= ble > +files in OUTPUTS." =E2=80=A6 and here a comment as to why we=E2=80=99re doing this, possibly l= inking to previous discussions. Otherwise LGTM, thank you! Ludo=E2=80=99.