|
3 | 3 | //
|
4 | 4 | // ==========================================================================
|
5 | 5 |
|
| 6 | +var dlopenMissingError = "'To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking'" |
| 7 | + |
6 | 8 | var LibraryDylink = {
|
7 | 9 | #if RELOCATABLE
|
8 | 10 | $resolveGlobalSymbol__internal: true,
|
@@ -199,14 +201,24 @@ var LibraryDylink = {
|
199 | 201 | #endif
|
200 | 202 |
|
201 | 203 | #if !MAIN_MODULE
|
| 204 | +#if !ALLOW_UNIMPLEMENTED_SYSCALLS |
| 205 | + _dlopen_js__deps: [function() { error(dlopenMissingError); }], |
| 206 | + _emscripten_dlopen_js__deps: [function() { error(dlopenMissingError); }], |
| 207 | + _dlsym_js__deps: [function() { error(dlopenMissingError); }], |
| 208 | +#else |
| 209 | + $dlopenMissingError: `= ${dlopenMissingError}`, |
| 210 | + _dlopen_js__deps: ['$dlopenMissingError'], |
| 211 | + _emscripten_dlopen_js__deps: ['$dlopenMissingError'], |
| 212 | + _dlsym_js__deps: ['$dlopenMissingError'], |
| 213 | +#endif |
202 | 214 | _dlopen_js: function(filename, flag) {
|
203 |
| - abort("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking"); |
| 215 | + abort(dlopenMissingError); |
204 | 216 | },
|
205 | 217 | _emscripten_dlopen_js: function(filename, flags, user_data, onsuccess, onerror) {
|
206 |
| - abort("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking"); |
| 218 | + abort(dlopenMissingError); |
207 | 219 | },
|
208 | 220 | _dlsym_js: function(handle, symbol) {
|
209 |
| - abort("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking"); |
| 221 | + abort(dlopenMissingError); |
210 | 222 | },
|
211 | 223 | _dlinit: function() {},
|
212 | 224 | #else // MAIN_MODULE != 0
|
|
0 commit comments