Skip to content

Fix --build_wasm_static_lib implicitly enable --build_wasm#27342

Open
Copilot wants to merge 2 commits intomainfrom
copilot/modify-build-scripts-wasm
Open

Fix --build_wasm_static_lib implicitly enable --build_wasm#27342
Copilot wants to merge 2 commits intomainfrom
copilot/modify-build-scripts-wasm

Conversation

Copy link
Contributor

Copilot AI commented Feb 13, 2026

Description

Moves the --build_wasm_static_lib → --build_wasm implication from build.py into build_args.py's post-processing, before the cmake generator selection. Previously, build_args.py chose the generator based on args.build_wasm (still False), and build.py only set it to True afterwards—too late.

  • tools/ci_build/build_args.py: Set args.build_wasm = True when args.build_wasm_static_lib is set, prior to generator and cross-compilation logic.
  • tools/ci_build/build.py: Remove the now-redundant identical check.

Motivation and Context

Using --build_wasm_static_lib without --build_wasm caused cmake to use the wrong generator (e.g., Visual Studio instead of Ninja on Windows) and miss Emscripten-specific configuration, leading to build failures like missing libiconv.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

When --build_wasm_static_lib is specified, treat --build_wasm as
implicitly enabled. This is done in build_args.py's post-processing
section, before the cmake generator is selected, so that all
downstream logic correctly recognizes this as a wasm build.

The redundant check in build.py is removed since it's now handled
earlier in the argument parsing phase.

Fixes #27313

Co-authored-by: fs-eire <7679871+fs-eire@users.noreply.github.com>
Copilot AI changed the title [WIP] Update build scripts to enable --build_wasm implicitly Make --build_wasm_static_lib implicitly enable --build_wasm Feb 13, 2026
Copilot AI requested a review from fs-eire February 13, 2026 22:06
@fs-eire fs-eire changed the title Make --build_wasm_static_lib implicitly enable --build_wasm Fix --build_wasm_static_lib implicitly enable --build_wasm Feb 14, 2026
@fs-eire fs-eire marked this pull request as ready for review February 14, 2026 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants