From 07571e7ae54dd0ec05c9c7f1278b4cea76e38f10 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Wed, 30 Jun 2021 16:39:22 -0700 Subject: [PATCH] python3: only enable LTO for 64bit builds Avoid failures with 32bit builds: ``` cc1: error: LTO support has not been enabled in this configuration ``` --- pkgs/development/interpreters/python/cpython/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index 4ee67a452fea..842d132fd44c 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -42,7 +42,8 @@ # enableNoSemanticInterposition is a subset of the enableOptimizations flag that doesn't harm reproducibility. , enableNoSemanticInterposition ? true # enableLTO is a subset of the enableOptimizations flag that doesn't harm reproducibility. -, enableLTO ? true +# enabling LTO on 32bit arch causes downstream packages to fail when linking +, enableLTO ? stdenv.is64bit , reproducibleBuild ? true , pythonAttr ? "python${sourceVersion.major}${sourceVersion.minor}" }: