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
Consider unexpected undefined symbols to be errors (#86)
## Motivation for the change, related issues
We currently live with the following undefined symbol warnings when
linking with Emscripten:
```
#84 1.878 warning: undefined symbol: SharpYuvConvert (referenced by root reference (e.g. compiled C/C++ code))
#84 1.878 warning: undefined symbol: SharpYuvGetConversionMatrix (referenced by root reference (e.g. compiled C/C++ code))
#84 1.878 warning: undefined symbol: SharpYuvInit (referenced by root reference (e.g. compiled C/C++ code))
#84 1.880 warning: undefined symbol: getcontext (referenced by root reference (e.g. compiled C/C++ code))
#84 1.880 warning: undefined symbol: getdtablesize (referenced by root reference (e.g. compiled C/C++ code))
#84 1.880 warning: undefined symbol: makecontext (referenced by root reference (e.g. compiled C/C++ code))
#84 1.880 warning: undefined symbol: swapcontext (referenced by root reference (e.g. compiled C/C++ code))
```
If any new undefined symbols come up, we would not notice them because
we set `ERROR_ON_UNDEFINED_SYMBOLS=0`. Let's change this to error so we
do not quietly miss new undefined symbols.
## Implementation details
Set ERROR_ON_UNDEFINED_SYMBOLS=1 so the Emscripten linker fails if there
are any undefined symbols.
We have been living with a number of undefined symbols. Some are
undefined because Emscripten does not provide them, and others are
undefined because we needed to link to an additional library. This PR
addresses both cases.
In order to be explicit and intentional about undefined symbols we know
and accept, this PR adds a JS library for Emscripten that explicitly
lists known undefined symbols and declares stubs for them that fail if
called. This way, we document the undefined symbols we know about and
avoid complaints from Emscripten.
## Testing Instructions (or ideally a Blueprint)
- CI
0 commit comments