From 809f157a49dc0851b3199f972b0ee3a70dc4262f Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Mon, 20 Jan 2025 16:11:48 +0100 Subject: [PATCH] maint: Disable LTO for static due to build failure --- packaging/dependencies.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packaging/dependencies.nix b/packaging/dependencies.nix index a3d7a73e4..22d4cf9e3 100644 --- a/packaging/dependencies.nix +++ b/packaging/dependencies.nix @@ -75,7 +75,11 @@ let # Users who are debugging Nix builds are expected to set the environment variable `mesonBuildType`, per the # guidance in https://github.com/NixOS/nix/blob/8a3fc27f1b63a08ac983ee46435a56cf49ebaf4a/doc/manual/source/development/debugging.md?plain=1#L10. # For this reason, we don't want to refer to `finalAttrs.mesonBuildType` here, but rather use the environment variable. - preConfigure = prevAttrs.preConfigure or "" + lib.optionalString (!stdenv.hostPlatform.isWindows) '' + preConfigure = prevAttrs.preConfigure or "" + lib.optionalString ( + !stdenv.hostPlatform.isWindows + # build failure + && !stdenv.hostPlatform.isStatic + ) '' case "$mesonBuildType" in release|minsize) appendToVar mesonFlags "-Db_lto=true" ;; *) appendToVar mesonFlags "-Db_lto=false" ;;