Godot Version
4.4.1
Question
Hey, I am experimenting with minimizing the size of a (single-threaded, release) web export template, and noticed a problem that seems to be related to the scons “production” flag.
With production="yes"
I get a couple warnings in the linking stage:
wasm-ld: warning: function signature mismatch: _ZNK19AudioStreamPlayback19get_sample_playbackEv
>>> defined as () -> void in servers\libservers.web.template_release.wasm32.nothreads.a(audio_stream.web.template_release.wasm32.nothreads.o)
>>> defined as (i32, i32) -> void in lto.tmp
wasm-ld: warning: function signature mismatch: _ZNK8Resource9duplicateEb
>>> defined as () -> void in core\libcore.web.template_release.wasm32.nothreads.a(resource.web.template_release.wasm32.nothreads.o)
>>> defined as (i32, i32, i32) -> void in lto.tmp
wasm-ld: warning: function signature mismatch: _ZNK11AudioStream15generate_sampleEv
>>> defined as () -> void in servers\libservers.web.template_release.wasm32.nothreads.a(audio_stream.web.template_release.wasm32.nothreads.o)
>>> defined as (i32, i32) -> void in lto.tmp
Creating 'bin\godot.web.template_release.wasm32.nothreads.wrapped.js'
Install file: "bin\godot.web.template_release.wasm32.nothreads.wasm" as "bin\.web_zip\godot.wasm"
Install file: "bin\godot.web.template_release.wasm32.nothreads.wrapped.js" as "bin\.web_zip\godot.js"
And when exporting a build with the resulting template, the engine fails to run in the browser with an “indirect call to null” message:
I can build without the “production” flag just fine, and the template is even smaller without it - so no problem there. Just would like to know if this known / expected / worth a bug report?
Thanks!