python / python/cpython

Wasi + Emscripten: configure behavior with --enable-optimizations seems incorrect?

Open
#126,748 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

build OS-emscripten OS-wasi
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

configure.ac sets DEF_MAKE_ALL_RULE to:

  • if --enable-optimizations is passed, then profile-opt
  • if ac_sys_system is Emscripten or WASI then build_wasm
  • if neither of these, then build_all.

build_wasm is a modified version of the build_all target that drops some targets that don't build correctly in webassembly targets or are unneeded. This logic hasn't been added for the case when --enable-optimizations is passed. I think the best solution for now would be to check for these targets with --enable-optimizations and error out. I don't think PGO will work on the wasm targets without tinkering either way.

Linked PRs
  • gh-126687

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in configure.ac at the DEF_MAKE_ALL_RULE logic and compare the --enable-optimizations path with the Emscripten and WASI build_wasm path. Verify the behavior for wasm targets and ensure the unsupported optimized configuration is rejected as described; gh-126687 is linked in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, wasm
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.