Merge pull request #264211 from robert-manchester/nuitka-darwin-linker

python311Packages.nuitka: change default of lto to off on darwin
This commit is contained in:
OTABI Tomoya 2023-10-31 16:57:55 +09:00 committed by GitHub
commit 30db625443
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 3 deletions

View File

@ -0,0 +1,15 @@
diff --git a/nuitka/build/SconsCompilerSettings.py b/nuitka/build/SconsCompilerSettings.py
index 319b72c4e..89d40f2a2 100644
--- a/nuitka/build/SconsCompilerSettings.py
+++ b/nuitka/build/SconsCompilerSettings.py
@@ -173,8 +173,8 @@ def _enableLtoSettings(
lto_mode = False
reason = "known to be not supported (CondaCC)"
elif isMacOS() and env.gcc_mode and env.clang_mode:
- lto_mode = True
- reason = "known to be supported (macOS clang)"
+ lto_mode = False
+ reason = "known to not be supported (macOS nix clang)"
elif env.mingw_mode and env.clang_mode:
lto_mode = False
reason = "known to not be supported (new MinGW64 Clang)"

View File

@ -1,5 +1,4 @@
{ lib
, stdenv
, buildPythonPackage
, ccache
, fetchFromGitHub
@ -22,6 +21,9 @@ buildPythonPackage rec {
hash = "sha256-spa3V9KEjqmwnHSuxLLIu9hJk5PrRwNyOw72sfxBVKo=";
};
# default lto off for darwin
patches = [ ./darwin-lto.patch ];
nativeBuildInputs = [ setuptools ];
nativeCheckInputs = [ ccache ];
@ -44,8 +46,6 @@ buildPythonPackage rec {
disabled = isPyPy;
meta = with lib; {
# tests fail with linker errors on darwin
broken = stdenv.isDarwin;
description = "Python compiler with full language support and CPython compatibility";
license = licenses.asl20;
homepage = "https://nuitka.net/";