Skip to content

Commit 69306d9

Browse files
Copilotfs-eire
andcommitted
Make --build_wasm_static_lib implicitly enable --build_wasm
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>
1 parent c1f37c4 commit 69306d9

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tools/ci_build/build.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2346,9 +2346,6 @@ def main():
23462346
if args.nnapi_min_api < 27:
23472347
raise BuildError("--nnapi_min_api should be 27+")
23482348

2349-
if args.build_wasm_static_lib:
2350-
args.build_wasm = True
2351-
23522349
if args.build_wasm:
23532350
if not args.disable_wasm_exception_catching and args.disable_exceptions:
23542351
# When '--disable_exceptions' is set, we set '--disable_wasm_exception_catching' as well

tools/ci_build/build_args.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -935,6 +935,10 @@ def convert_arg_line_to_args(self, arg_line: str) -> list[str]: # Use list[str]
935935
if args.android_ndk_path:
936936
args.android_ndk_path = os.path.normpath(args.android_ndk_path)
937937

938+
# Treat --build_wasm_static_lib as implying --build_wasm
939+
if args.build_wasm_static_lib:
940+
args.build_wasm = True
941+
938942
# Handle WASM exception logic
939943
if args.enable_wasm_api_exception_catching:
940944
args.disable_wasm_exception_catching = True # Catching at API level implies disabling broader catching

0 commit comments

Comments
 (0)