From b26a07e7deae1fb1da7b65e40ebe9c3fe75dd59f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=9F=E5=A4=96=E4=B9=8B=E7=A5=9E?= Date: Sat, 18 Jun 2022 06:36:36 +0800 Subject: [PATCH] Python: Use `-O3` level optimization (#11825) --- mingw-w64-python/PKGBUILD | 4 +++- mingw-w64-python/update-patches.sh | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mingw-w64-python/PKGBUILD b/mingw-w64-python/PKGBUILD index a7fade1cea..4fef0fb846 100644 --- a/mingw-w64-python/PKGBUILD +++ b/mingw-w64-python/PKGBUILD @@ -22,7 +22,7 @@ else pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}${_pybasever}") fi pkgver=${_pybasever}.5 -pkgrel=1 +pkgrel=2 pkgdesc="A high-level scripting language (mingw-w64)" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64') @@ -353,6 +353,8 @@ build() { declare -a _extra_config if check_option "debug" "n"; then _extra_config+=("--enable-optimizations") + # Upstream defaults to -O3, so we can do too + CFLAGS+=" -O3" # FIXME: https://github.com/msys2-contrib/cpython-mingw/issues/10 # _extra_config+=("--with-lto") else diff --git a/mingw-w64-python/update-patches.sh b/mingw-w64-python/update-patches.sh index 646912c533..4c29df47cf 100644 --- a/mingw-w64-python/update-patches.sh +++ b/mingw-w64-python/update-patches.sh @@ -8,7 +8,7 @@ die () { } cd "$(dirname "$0")" || -die "Could not cd to mingw-w64-python3.9/" +die "Could not cd to mingw-w64-python3.10/" git rev-parse --verify HEAD >/dev/null && git update-index -q --ignore-submodules --refresh &&