python: 3.11.1, use -flto=thin when clang (#34951)

This commit is contained in:
Harmen Stoppels 2023-01-17 17:26:38 +01:00 committed by GitHub
parent 2fdd72094a
commit c0389ab3d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,6 +44,7 @@ class Python(Package):
install_targets = ["install"]
build_targets: List[str] = []
version("3.11.1", sha256="baed518e26b337d4d8105679caf68c5c32630d702614fc174e98cb95c46bdfa4")
version("3.11.0", sha256="64424e96e2457abbac899b90f9530985b51eef2905951febd935f0e73414caeb")
version(
"3.10.8",
@ -469,6 +470,10 @@ def configure_args(self):
if "+optimizations" in spec:
config_args.append("--enable-optimizations")
# Prefer thin LTO for faster compilation times.
if "@3.11.0: %clang@3.9:" in spec or "@3.11.0: %apple-clang@8:" in spec:
config_args.append("--with-lto=thin")
else:
config_args.append("--with-lto")
config_args.append("--with-computed-gotos")