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.
This commit is contained in:
Victor Stinner 2024-06-18 19:35:44 +02:00 committed by GitHub
parent c81a5e6b5b
commit 49f51deeef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 13 additions and 0 deletions

View File

@ -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.

5
configure generated vendored
View File

@ -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

View File

@ -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])