Skip to content

Commit

Permalink
pythongh-120688: Build WASI with -O3 in debug mode (python#120691)
Browse files Browse the repository at this point in the history
On WASI in debug mode, Python is now built with compiler flag -O3
instead of -Og, to support more recursive calls.
  • Loading branch information
vstinner authored Jun 18, 2024
1 parent c81a5e6 commit 49f51de
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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 changes: 5 additions & 0 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit 49f51de

Please sign in to comment.