diff options
author | Ludovic Courtès <ludo@gnu.org> | 2022-10-08 14:43:07 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2022-10-08 14:49:56 +0200 |
commit | ccc2658e2a111590ec25e308946e47a24d357785 (patch) | |
tree | eebc21a6c6729ce5a7d6147ef5f3beca3bac461f /guix | |
parent | 857648a5e602e69cef011b9121acdfa5578b6c11 (diff) |
build-system: Factorize 'strip' flags and directories.
Previously only 'gnu-build-system' would default to "--strip-unneeded",
since commit e0f31baacc6ad30096a332b69433c85f5830bb2c; most other build
systems would default to "--strip-debug".
This change brings consistency.
* guix/build-system/gnu.scm (%strip-flags, %strip-directories): Export.
* guix/build-system/cmake.scm (cmake-build, cmake-cross-build): Use them.
* guix/build-system/copy.scm (copy-build): Likewise.
* guix/build-system/dune.scm (dune-build): Likewise.
* guix/build-system/glib-or-gtk.scm (glib-or-gtk-build)
(glib-or-gtk-cross-build): Likewise.
* guix/build-system/maven.scm (maven-build): Likewise.
* guix/build-system/meson.scm (meson-build, meson-cross-build): Likewise.
* guix/build-system/ocaml.scm (ocaml-build): Likewise.
* guix/build-system/qt.scm (qt-build, qt-cross-build): Likewise.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/build-system/cmake.scm | 11 | ||||
-rw-r--r-- | guix/build-system/copy.scm | 7 | ||||
-rw-r--r-- | guix/build-system/dune.scm | 7 | ||||
-rw-r--r-- | guix/build-system/glib-or-gtk.scm | 12 | ||||
-rw-r--r-- | guix/build-system/gnu.scm | 4 | ||||
-rw-r--r-- | guix/build-system/maven.scm | 7 | ||||
-rw-r--r-- | guix/build-system/meson.scm | 12 | ||||
-rw-r--r-- | guix/build-system/ocaml.scm | 5 | ||||
-rw-r--r-- | guix/build-system/qt.scm | 11 |
9 files changed, 32 insertions, 44 deletions
diff --git a/guix/build-system/cmake.scm b/guix/build-system/cmake.scm index 0aabc95b90..ffd04867a2 100644 --- a/guix/build-system/cmake.scm +++ b/guix/build-system/cmake.scm @@ -110,9 +110,8 @@ (validate-runpath? #t) (patch-shebangs? #t) (strip-binaries? #t) - (strip-flags ''("--strip-debug")) - (strip-directories ''("lib" "lib64" "libexec" - "bin" "sbin")) + (strip-flags %strip-flags) + (strip-directories %strip-directories) (phases '%standard-phases) (system (%current-system)) (substitutable? #t) @@ -185,10 +184,8 @@ provides a 'CMakeLists.txt' file as its build system." (validate-runpath? #t) (patch-shebangs? #t) (strip-binaries? #t) - (strip-flags ''("--strip-debug" - "--enable-deterministic-archives")) - (strip-directories ''("lib" "lib64" "libexec" - "bin" "sbin")) + (strip-flags %strip-flags) + (strip-directories %strip-directories) (phases '%standard-phases) (substitutable? #t) (system (%current-system)) diff --git a/guix/build-system/copy.scm b/guix/build-system/copy.scm index 0df397cf77..ea85719286 100644 --- a/guix/build-system/copy.scm +++ b/guix/build-system/copy.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu> ;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz> -;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2021, 2022 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -88,9 +88,8 @@ (validate-runpath? #t) (patch-shebangs? #t) (strip-binaries? #t) - (strip-flags ''("--strip-debug")) - (strip-directories ''("lib" "lib64" "libexec" - "bin" "sbin")) + (strip-flags %strip-flags) + (strip-directories %strip-directories) (phases '(@ (guix build copy-build-system) %standard-phases)) (system (%current-system)) diff --git a/guix/build-system/dune.scm b/guix/build-system/dune.scm index 12100fd8e8..05784feb32 100644 --- a/guix/build-system/dune.scm +++ b/guix/build-system/dune.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu> ;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com> -;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2021, 2022 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2021 pukkamustard <pukkamustard@posteo.net> ;;; ;;; This file is part of GNU Guix. @@ -112,9 +112,8 @@ (validate-runpath? #t) (patch-shebangs? #t) (strip-binaries? #t) - (strip-flags ''("--strip-debug")) - (strip-directories ''("lib" "lib64" "libexec" - "bin" "sbin")) + (strip-flags gnu:%strip-flags) + (strip-directories gnu:%strip-directories) (phases '(@ (guix build dune-build-system) %standard-phases)) (system (%current-system)) diff --git a/guix/build-system/glib-or-gtk.scm b/guix/build-system/glib-or-gtk.scm index aa9703829b..a9041bb9f9 100644 --- a/guix/build-system/glib-or-gtk.scm +++ b/guix/build-system/glib-or-gtk.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013-2015, 2019-2022 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com> ;;; Copyright © 2014 Federico Beffa <beffa@fbengineering.ch> ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be> @@ -139,9 +139,8 @@ (validate-runpath? #t) (patch-shebangs? #t) (strip-binaries? #t) - (strip-flags ''("--strip-debug")) - (strip-directories ''("lib" "lib64" "libexec" - "bin" "sbin")) + (strip-flags %strip-flags) + (strip-directories %strip-directories) (phases '(@ (guix build glib-or-gtk-build-system) %standard-phases)) (glib-or-gtk-wrap-excluded-outputs ''()) @@ -214,9 +213,8 @@ (make-dynamic-linker-cache? #f) (patch-shebangs? #t) (strip-binaries? #t) - (strip-flags ''("--strip-debug")) - (strip-directories ''("lib" "lib64" "libexec" - "bin" "sbin")) + (strip-flags %strip-flags) + (strip-directories %strip-directories) (phases '(@ (guix build glib-or-gtk-build-system) %standard-phases)) (glib-or-gtk-wrap-excluded-outputs ''()) diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm index 8eea1cd4c2..8054f9893a 100644 --- a/guix/build-system/gnu.scm +++ b/guix/build-system/gnu.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012-2022 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -29,6 +29,8 @@ #:use-module (srfi srfi-1) #:use-module (ice-9 match) #:export (%gnu-build-system-modules + %strip-flags + %strip-directories gnu-build gnu-build-system standard-packages diff --git a/guix/build-system/maven.scm b/guix/build-system/maven.scm index 0af5922692..c5a26c8754 100644 --- a/guix/build-system/maven.scm +++ b/guix/build-system/maven.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2020 Julien Lepiller <julien@lepiller.eu> -;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2021, 2022 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -154,9 +154,8 @@ (exclude %default-exclude) (local-packages '()) (tests? #t) - (strip-flags ''("--strip-debug")) - (strip-directories ''("lib" "lib64" "libexec" - "bin" "sbin")) + (strip-flags %strip-flags) + (strip-directories %strip-directories) (phases '%standard-phases) (system (%current-system)) (imported-modules %maven-build-system-modules) diff --git a/guix/build-system/meson.scm b/guix/build-system/meson.scm index 9fee6c4570..e75c1a17cb 100644 --- a/guix/build-system/meson.scm +++ b/guix/build-system/meson.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 Peter Mikkelsen <petermikkelsen10@gmail.com> ;;; Copyright © 2018, 2019 Marius Bakke <mbakke@fastmail.com> -;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2021, 2022 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be> ;;; Copyright © 2022 Efraim Flashner <efraim@flashner.co.il> ;;; @@ -180,9 +180,8 @@ TRIPLET." (validate-runpath? #t) (patch-shebangs? #t) (strip-binaries? #t) - (strip-flags ''("--strip-debug")) - (strip-directories ''("lib" "lib64" "libexec" - "bin" "sbin")) + (strip-flags %strip-flags) + (strip-directories %strip-directories) (elf-directories ''("lib" "lib64" "libexec" "bin" "sbin")) (phases '%standard-phases) @@ -262,9 +261,8 @@ has a 'meson.build' file." (validate-runpath? #t) (patch-shebangs? #t) (strip-binaries? #t) - (strip-flags ''("--strip-debug")) - (strip-directories ''("lib" "lib64" "libexec" - "bin" "sbin")) + (strip-flags %strip-flags) + (strip-directories %strip-directories) (elf-directories ''("lib" "lib64" "libexec" "bin" "sbin")) ;; See 'gnu-cross-build' for why this needs to be diff --git a/guix/build-system/ocaml.scm b/guix/build-system/ocaml.scm index 5ced9d243b..67bb718e12 100644 --- a/guix/build-system/ocaml.scm +++ b/guix/build-system/ocaml.scm @@ -243,9 +243,8 @@ pre-defined variants." (validate-runpath? #t) (patch-shebangs? #t) (strip-binaries? #t) - (strip-flags ''("--strip-debug")) - (strip-directories ''("lib" "lib64" "libexec" - "bin" "sbin")) + (strip-flags %strip-flags) + (strip-directories %strip-directories) (phases '(@ (guix build ocaml-build-system) %standard-phases)) (system (%current-system)) diff --git a/guix/build-system/qt.scm b/guix/build-system/qt.scm index a9bf728f25..ba5c84347a 100644 --- a/guix/build-system/qt.scm +++ b/guix/build-system/qt.scm @@ -135,9 +135,8 @@ (validate-runpath? #t) (patch-shebangs? #t) (strip-binaries? #t) - (strip-flags ''("--strip-debug")) - (strip-directories ''("lib" "lib64" "libexec" - "bin" "sbin")) + (strip-flags %strip-flags) + (strip-directories %strip-directories) (phases '%standard-phases) (qt-wrap-excluded-outputs ''()) (qt-wrap-excluded-inputs %qt-wrap-excluded-inputs) @@ -208,10 +207,8 @@ provides a 'CMakeLists.txt' file as its build system." (validate-runpath? #t) (patch-shebangs? #t) (strip-binaries? #t) - (strip-flags ''("--strip-debug" - "--enable-deterministic-archives")) - (strip-directories ''("lib" "lib64" "libexec" - "bin" "sbin")) + (strip-flags %strip-flags) + (strip-directories %strip-directories) (phases '%standard-phases) (system (%current-system)) (build (nix-system->gnu-triplet system)) |