[Bazel] Let audio workout bootstrap js file be generated. (#1404)

* Allows generation of audio worklet bootstrap js file

In order to allow users to generate the file, the allowed extension list in `link_wrapper.py` has been updated accordingly.

* adds audio worklet js to wasm_cc_binary too

---------

Co-authored-by: William Izzo <william.izzo@hey.com>
This commit is contained in:
William Izzo
2024-06-14 18:13:50 +02:00
committed by GitHub
parent ca7b40ae22
commit d29161158e
2 changed files with 5 additions and 1 deletions

View File

@@ -90,7 +90,8 @@ extensions = [
'.data',
'.js.symbols',
'.wasm.debug.wasm',
'.html'
'.html',
'.aw.js'
]
for ext in extensions:

View File

@@ -70,6 +70,7 @@ _ALLOW_OUTPUT_EXTNAMES = [
".js.symbols",
".wasm.debug.wasm",
".html",
".aw.js",
]
_WASM_BINARY_COMMON_ATTRS = {
@@ -151,6 +152,7 @@ def _wasm_cc_binary_legacy_impl(ctx):
ctx.outputs.symbols,
ctx.outputs.dwarf,
ctx.outputs.html,
ctx.outputs.audio_worklet,
]
args = ctx.actions.args()
@@ -201,6 +203,7 @@ def _wasm_binary_legacy_outputs(name, cc_target):
"symbols": "{}/{}.js.symbols".format(name, basename),
"dwarf": "{}/{}.wasm.debug.wasm".format(name, basename),
"html": "{}/{}.html".format(name, basename),
"audio_worklet": "{}/{}.aw.js".format(name, basename)
}
return outputs