Skip to content

build-script: allow --test-wasm-stdlib without --build-wasm-stdlib #83135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions utils/build_swift/build_swift/driver_arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,9 @@ def _apply_default_arguments(args):
args.test_xros_host = False
args.test_android_host = False

if args.build_wasmstdlib:
args.test_wasmstdlib = True


def create_argument_parser():
"""Return a configured argument parser."""
Expand Down Expand Up @@ -829,6 +832,8 @@ def create_argument_parser():
option(['--build-wasm-stdlib'], toggle_true('build_wasmstdlib'),
help='build the stdlib for WebAssembly target into a'
'separate build directory ')
option('--test-wasm-stdlib', toggle_true('test_wasmstdlib'),
help='test stdlib for WebAssembly')
option(['--wasmkit'], toggle_true('build_wasmkit'),
help='build WasmKit')
option(['--install-wasmkit'], toggle_true('install_wasmkit'),
Expand Down
3 changes: 2 additions & 1 deletion utils/build_swift/tests/expected_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@
'test_swiftformat': False,
'test_swiftdocc': False,
'test_toolchainbenchmarks': False,
'test_wasmstdlib': True,
'test_wasmstdlib': False,
'tvos': False,
'tvos_all': False,
'validation_test': None,
Expand Down Expand Up @@ -591,6 +591,7 @@ class BuildScriptImplOption(_BaseOption):
SetTrueOption('--swiftdocc', dest='build_swiftdocc'),
SetTrueOption('--build-minimal-stdlib', dest='build_minimalstdlib'),
SetTrueOption('--build-wasm-stdlib', dest='build_wasmstdlib'),
SetTrueOption('--test-wasm-stdlib', dest='test_wasmstdlib'),
SetTrueOption('--wasmkit', dest='build_wasmkit'),
SetTrueOption('--build-stdlib-docs'),
SetTrueOption('--preview-stdlib-docs'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,9 @@ def compute_product_pipelines(self):
builder.add_product(products.WasmKit,
is_enabled=self.args.build_wasmkit)
builder.add_product(products.WasmStdlib,
is_enabled=self.args.build_wasmstdlib)
# Revert `or self.args.test_wasmstdlib` once we adopt `wasi-sdk-26`
# or higher version that includes https://github.com/WebAssembly/wasi-libc/commit/eadb436d5c09f7983c3a687086e5af6b6e9f5510.patch
is_enabled=self.args.build_wasmstdlib or self.args.test_wasmstdlib)
builder.add_product(products.WasmThreadsStdlib,
is_enabled=self.args.build_wasmstdlib)
builder.add_product(products.WasmSwiftSDK,
Expand Down