From 1cce7f112e98db5b61ca11de29e41ab095843b07 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Wed, 19 Mar 2025 16:59:30 -0500 Subject: [PATCH 1/2] Use PGO during musl builds --- ci-targets.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ci-targets.yaml b/ci-targets.yaml index cd892ac9..9c23f9b6 100644 --- a/ci-targets.yaml +++ b/ci-targets.yaml @@ -51,7 +51,7 @@ linux: build_options: - debug - noopt - - lto + - pgo+lto build_options_conditional: - options: - freethreaded+debug @@ -72,7 +72,7 @@ linux: build_options: - debug - noopt - - lto + - pgo+lto build_options_conditional: - options: - freethreaded+debug @@ -93,7 +93,7 @@ linux: build_options: - debug - noopt - - lto + - pgo+lto build_options_conditional: - options: - freethreaded+debug @@ -114,7 +114,7 @@ linux: build_options: - debug - noopt - - lto + - pgo+lto build_options_conditional: - options: - freethreaded+debug @@ -135,7 +135,7 @@ linux: build_options: - debug - noopt - - lto + - pgo+lto build_options_conditional: - options: - freethreaded+debug @@ -156,7 +156,7 @@ linux: build_options: - debug - noopt - - lto + - pgo+lto build_options_conditional: - options: - freethreaded+debug @@ -262,7 +262,7 @@ linux: - lto+static - debug - noopt - - lto + - pgo+lto run: true x86_64_v2-unknown-linux-musl: @@ -281,7 +281,7 @@ linux: - lto+static - debug - noopt - - lto + - pgo+lto run: true x86_64_v3-unknown-linux-musl: @@ -300,7 +300,7 @@ linux: - lto+static - debug - noopt - - lto + - pgo+lto run: true x86_64_v4-unknown-linux-musl: @@ -319,7 +319,7 @@ linux: - lto+static - debug - noopt - - lto + - pgo+lto run: true windows: From db52d2b61a2354fe81b9294c8bad48c825f6ea22 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Wed, 19 Mar 2025 18:00:49 -0500 Subject: [PATCH 2/2] Disable the experimental JIT on musl --- cpython-unix/build-cpython.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpython-unix/build-cpython.sh b/cpython-unix/build-cpython.sh index 5e66f053..fa0d25bc 100755 --- a/cpython-unix/build-cpython.sh +++ b/cpython-unix/build-cpython.sh @@ -431,8 +431,8 @@ if [ -n "${CPYTHON_OPTIMIZED}" ]; then CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --enable-bolt" fi - # Allow users to enable the experimental JIT on 3.13+ - if [[ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_13}" ]]; then + # Allow users to enable the experimental JIT on 3.13+ (but not on musl) + if [[ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_13}" && ! "${CC}" = "musl-clang" ]]; then # The JIT build is failing on macOS due to compiler errors # Only enable on Linux / 3.13 until that's fixed upstream