You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jsifier: Make JS libraries aliases work even when native export exists
Followup to #19033.
Updating the `test_closure_full_js_library` to include webgl2 caused
a lot of `JSC_REFERENCE_BEFORE_DECLARE` closure errors.
This is because we had JS aliases who's target was defined both in
JS and in native code. In this case the jsifier was choosing not to
include the JS version, which in the case of the GL symbols not what
we want. This is why, prior to #19033, we were duplicating the library
entries.
This this change JS symbol aliases now force the alias target to be
included from the JS library, even in the case that the native code
also emits its own version of a symbol.
This happens in the case of pthreads + MAIN_MODULE +
OFFSCREEN_FRAMEBUFFER. In this mode webgl2.c defines (and also exports)
the entire set of GL library symbols. In this case we still want the
`emscripten_XX` aliases to point to the original JS versions, no the
natively exported version.
Sadly it looks like we have at testing gab for that particular
combination.
0 commit comments