diff options
| author | Christopher Baines <mail@cbaines.net> | 2026-03-02 12:45:00 +0000 |
|---|---|---|
| committer | Christopher Baines <mail@cbaines.net> | 2026-03-11 15:31:06 +0000 |
| commit | 991c410bcff9e03761cc164896e44f0d1db8480a (patch) | |
| tree | a2218d238045b9e22b8895e1018a17e5db23fc78 /build-aux | |
| parent | c56f19efc66c8970e23c4cc4778fe6fcd2574994 (diff) | |
build-aux: Disable file port name canonicalization in a few places.
I'm assuming this doesn't have any meaningful effect, and it seems to reduce
the number of readlink calls by a lot.
* build-aux/build-self.scm (build-program): Set
%file-port-name-canonicalization to #f.
(build): Ditto.
* build-aux/compile-as-derivation.scm: Ditto.
Change-Id: If43415c46c3911e84c76d1a9828b9c417a140a1b
Diffstat (limited to 'build-aux')
| -rw-r--r-- | build-aux/build-self.scm | 6 | ||||
| -rw-r--r-- | build-aux/compile-as-derivation.scm | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/build-aux/build-self.scm b/build-aux/build-self.scm index b0a427698fa..942cf5f5346 100644 --- a/build-aux/build-self.scm +++ b/build-aux/build-self.scm | |||
| @@ -111,6 +111,9 @@ build daemon, from within the generated build program." | |||
| 111 | #~(begin | 111 | #~(begin |
| 112 | (use-modules (ice-9 match)) | 112 | (use-modules (ice-9 match)) |
| 113 | 113 | ||
| 114 | ;; To avoid lots of readlink calls | ||
| 115 | (fluid-set! %file-port-name-canonicalization #f) | ||
| 116 | |||
| 114 | (eval-when (expand load eval) | 117 | (eval-when (expand load eval) |
| 115 | ;; (gnu packages …) modules are going to be looked up | 118 | ;; (gnu packages …) modules are going to be looked up |
| 116 | ;; under SOURCE. (guix config) is looked up in FRONT. | 119 | ;; under SOURCE. (guix config) is looked up in FRONT. |
| @@ -246,6 +249,9 @@ Display a spinner when nothing happens." | |||
| 246 | #:rest rest) | 249 | #:rest rest) |
| 247 | "Return a derivation that unpacks SOURCE into STORE and compiles Scheme | 250 | "Return a derivation that unpacks SOURCE into STORE and compiles Scheme |
| 248 | files." | 251 | files." |
| 252 | ;; Avoid lots of readlink calls | ||
| 253 | (fluid-set! %file-port-name-canonicalization #f) | ||
| 254 | |||
| 249 | ;; Build the build program and then use it as a trampoline to build from | 255 | ;; Build the build program and then use it as a trampoline to build from |
| 250 | ;; SOURCE. | 256 | ;; SOURCE. |
| 251 | (mlet %store-monad ((build (build-program source version guile-version | 257 | (mlet %store-monad ((build (build-program source version guile-version |
diff --git a/build-aux/compile-as-derivation.scm b/build-aux/compile-as-derivation.scm index 9da13893b51..c0b80e091f5 100644 --- a/build-aux/compile-as-derivation.scm +++ b/build-aux/compile-as-derivation.scm | |||
| @@ -20,6 +20,9 @@ | |||
| 20 | 20 | ||
| 21 | (use-modules (srfi srfi-26)) | 21 | (use-modules (srfi srfi-26)) |
| 22 | 22 | ||
| 23 | ;; Avoid lots of readlink calls | ||
| 24 | (fluid-set! %file-port-name-canonicalization #f) | ||
| 25 | |||
| 23 | ;; Add ~/.config/guix/current to the search path. | 26 | ;; Add ~/.config/guix/current to the search path. |
| 24 | (eval-when (expand load eval) | 27 | (eval-when (expand load eval) |
| 25 | (and=> (or (getenv "XDG_CONFIG_HOME") | 28 | (and=> (or (getenv "XDG_CONFIG_HOME") |
