Skip to content

Commit 5b2dc55

Browse files
committed
Include Wasm in Node.js standalone, if wasm suite is dynamically imported.
1 parent ec6ea99 commit 5b2dc55

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

graal-nodejs/mx.graal-nodejs/mx_graal_nodejs.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,9 @@ def _prepare_svm_env():
574574
def mx_post_parse_cmd_line(args):
575575
mx_graal_nodejs_benchmark.register_nodejs_vms()
576576

577+
def _is_wasm_available():
578+
return ('wasm', True) in mx.get_dynamic_imports()
579+
577580
mx_sdk.register_graalvm_component(mx_sdk.GraalVmLanguage(
578581
suite=_suite,
579582
name='Graal.nodejs',
@@ -604,6 +607,7 @@ def mx_post_parse_cmd_line(args):
604607
'--tool:all',
605608
'--language:nodejs',
606609
'-Dgraalvm.libpolyglot=true', # `lib:graal-nodejs` should be initialized like `lib:polyglot` (GR-10038)
610+
*(['--language:wasm'] if _is_wasm_available() else []),
607611
],
608612
build_args_enterprise=[
609613
'-H:+AuxiliaryEngineCache',
@@ -618,6 +622,7 @@ def mx_post_parse_cmd_line(args):
618622
standalone_dependencies={
619623
'GraalVM license files': ('', ['GRAALVM-README.md']),
620624
'Graal.nodejs license files': ('', []),
625+
**({'GraalWasm' : ('', ['LICENSE_WASM.txt'])} if _is_wasm_available() else {}),
621626
},
622627
standalone_dependencies_enterprise={
623628
'GraalVM enterprise license files': ('', ['GRAALVM-README.md']),

0 commit comments

Comments
 (0)