From 42f6c2c7ed3e5c9b27c7f05415ba0d22913fa3bd Mon Sep 17 00:00:00 2001 From: ReplayCoding Date: Mon, 14 Mar 2022 15:57:16 -0700 Subject: [PATCH] python: fix enableOptimizations with clang --- pkgs/development/interpreters/python/cpython/default.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index 1bcbd2bb4b5e..642608a72228 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -63,9 +63,6 @@ assert x11Support -> tcl != null assert bluezSupport -> bluez != null; -assert lib.assertMsg (enableOptimizations -> (!stdenv.cc.isClang)) - "Optimizations with clang are not supported. configure: error: llvm-profdata is required for a --enable-optimizations build but could not be found."; - assert lib.assertMsg (reproducibleBuild -> stripBytecode) "Deterministic builds require stripping bytecode."; @@ -111,7 +108,7 @@ let ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ buildPackages.stdenv.cc pythonForBuild - ] ++ optionals (stdenv.cc.isClang && enableLTO) [ + ] ++ optionals (stdenv.cc.isClang && (enableLTO || enableOptimizations)) [ stdenv.cc.cc.libllvm.out ];