gh-120688: Build WASI with -O3 in debug mode#120691
Conversation
On WASI in debug mode, Python is now built with compiler flag -O3 instead of -Og, to support more recursive calls.
|
!buildbot wasm32-wasi |
|
cc @brettcannon @ericsnowcurrently All my attempts to increase the WASI memory went nowhere. On the current main branch with a debug build, the following program fails when run with more than 35 recursive calls :-( import sys
def call_method(depth):
class X:
def __call__(self, n):
if n: return self(n-1)
X()(depth)
sys.setrecursionlimit(10_000)
n = 35
call_method(n)
print(f"recursive: max {n} calls")With this change, Python is always built with -O3, in release an debug mode, and the recursion limit is closer to 150 in debug mode which is enough to fix test_email. As you can see, the test suite pass again on "buildbot/wasm32-wasi PR" (whereas it's failing without this change). |
|
|
Thanks, Victor! |
On WASI in debug mode, Python is now built with compiler flag -O3 instead of -Og, to support more recursive calls.
On WASI in debug mode, Python is now built with compiler flag -O3 instead of -Og, to support more recursive calls.
On WASI in debug mode, Python is now built with compiler flag -O3 instead of -Og, to support more recursive calls.
On WASI in debug mode, Python is now built with compiler flag -O3 instead of -Og, to support more recursive calls.