https://github.com/python/cpython/commit/49f51deeef901b677853f00e428cbaeb13ecd2f2
commit: 49f51deeef901b677853f00e428cbaeb13ecd2f2
branch: main
author: Victor Stinner <[email protected]>
committer: vstinner <[email protected]>
date: 2024-06-18T19:35:44+02:00
summary:
gh-120688: Build WASI with -O3 in debug mode (#120691)
On WASI in debug mode, Python is now built with compiler flag -O3
instead of -Og, to support more recursive calls.
files:
A Misc/NEWS.d/next/Build/2024-06-18-15-32-36.gh-issue-120688.tjIPLD.rst
M configure
M configure.ac
diff --git
a/Misc/NEWS.d/next/Build/2024-06-18-15-32-36.gh-issue-120688.tjIPLD.rst
b/Misc/NEWS.d/next/Build/2024-06-18-15-32-36.gh-issue-120688.tjIPLD.rst
new file mode 100644
index 00000000000000..90f1f9138b6b58
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2024-06-18-15-32-36.gh-issue-120688.tjIPLD.rst
@@ -0,0 +1,3 @@
+On WASI in debug mode, Python is now built with compiler flag ``-O3``
+instead of ``-Og``, to support more recursive calls. Patch by Victor
+Stinner.
diff --git a/configure b/configure
index 003f68afae2cab..0f7ea7dfb5259d 100755
--- a/configure
+++ b/configure
@@ -9414,6 +9414,11 @@ then :
PYDEBUG_CFLAGS="-Og"
fi
+# gh-120688: WASI uses -O3 in debug mode to support more recursive calls
+if test "$ac_sys_system" = "WASI"; then
+ PYDEBUG_CFLAGS="-O3"
+fi
+
# tweak OPT based on compiler and platform, only if the user didn't set
# it on the command line
diff --git a/configure.ac b/configure.ac
index f9612b3275d3f0..a4698451465155 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2289,6 +2289,11 @@ PYDEBUG_CFLAGS="-O0"
AS_VAR_IF([ac_cv_cc_supports_og], [yes],
[PYDEBUG_CFLAGS="-Og"])
+# gh-120688: WASI uses -O3 in debug mode to support more recursive calls
+if test "$ac_sys_system" = "WASI"; then
+ PYDEBUG_CFLAGS="-O3"
+fi
+
# tweak OPT based on compiler and platform, only if the user didn't set
# it on the command line
AC_SUBST([OPT])
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]