On WASI in debug mode, Python is now built with compiler flag -O3
instead of -Og, to support more recursive calls.
--- /dev/null
+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.
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
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])