[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#29299] [PATCH] build-system/go: Don't let Go executables refer to t
From: |
Ludovic Courtès |
Subject: |
[bug#29299] [PATCH] build-system/go: Don't let Go executables refer to the Go compiler. |
Date: |
Thu, 16 Nov 2017 11:52:55 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Hello,
Leo Famulari <address@hidden> skribis:
> This is a naive adaptation of ((guix build utils)
> remove-store-references).
>
> 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-references):
> 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
> FILE-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 executable
> +files in OUTPUTS."
… and here a comment as to why we’re doing this, possibly linking to
previous discussions.
Otherwise LGTM, thank you!
Ludo’.