Skip to content

Commit d291611

Browse files
WilliamIzzo83William Izzo
andauthored
[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>
1 parent ca7b40a commit d291611

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

bazel/emscripten_toolchain/link_wrapper.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@
9090
'.data',
9191
'.js.symbols',
9292
'.wasm.debug.wasm',
93-
'.html'
93+
'.html',
94+
'.aw.js'
9495
]
9596

9697
for ext in extensions:

bazel/emscripten_toolchain/wasm_cc_binary.bzl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ _ALLOW_OUTPUT_EXTNAMES = [
7070
".js.symbols",
7171
".wasm.debug.wasm",
7272
".html",
73+
".aw.js",
7374
]
7475

7576
_WASM_BINARY_COMMON_ATTRS = {
@@ -151,6 +152,7 @@ def _wasm_cc_binary_legacy_impl(ctx):
151152
ctx.outputs.symbols,
152153
ctx.outputs.dwarf,
153154
ctx.outputs.html,
155+
ctx.outputs.audio_worklet,
154156
]
155157

156158
args = ctx.actions.args()
@@ -201,6 +203,7 @@ def _wasm_binary_legacy_outputs(name, cc_target):
201203
"symbols": "{}/{}.js.symbols".format(name, basename),
202204
"dwarf": "{}/{}.wasm.debug.wasm".format(name, basename),
203205
"html": "{}/{}.html".format(name, basename),
206+
"audio_worklet": "{}/{}.aw.js".format(name, basename)
204207
}
205208

206209
return outputs

0 commit comments

Comments
 (0)