Fix --build_wasm_static_lib implicitly enable --build_wasm#27342
Open
Fix --build_wasm_static_lib implicitly enable --build_wasm#27342
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Moves the
--build_wasm_static_lib → --build_wasmimplication frombuild.pyintobuild_args.py's post-processing, before the cmake generator selection. Previously,build_args.pychose the generator based onargs.build_wasm(stillFalse), andbuild.pyonly set it toTrueafterwards—too late.tools/ci_build/build_args.py: Setargs.build_wasm = Truewhenargs.build_wasm_static_libis 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_libwithout--build_wasmcaused 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 missinglibiconv.💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.