|
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,
|
@@ -188,14 +190,24 @@ var LibraryDylink = {
|
188 | 190 | #endif
|
189 | 191 |
|
190 | 192 | #if MAIN_MODULE == 0
|
| 193 | +#if !ALLOW_UNIMPLEMENTED_SYSCALLS |
| 194 | + _dlopen_js__deps: [function() { error(dlopenMissingError); }], |
| 195 | + _emscripten_dlopen_js__deps: [function() { error(dlopenMissingError); }], |
| 196 | + _dlsym_js__deps: [function() { error(dlopenMissingError); }], |
| 197 | +#else |
| 198 | + $dlopenMissingError: `= ${dlopenMissingError}`, |
| 199 | + _dlopen_js__deps: ['$dlopenMissingError'], |
| 200 | + _emscripten_dlopen_js__deps: ['$dlopenMissingError'], |
| 201 | + _dlsym_js__deps: ['$dlopenMissingError'], |
| 202 | +#endif |
191 | 203 | _dlopen_js: function(filename, flag) {
|
192 |
| - abort("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking"); |
| 204 | + abort(dlopenMissingError); |
193 | 205 | },
|
194 | 206 | _emscripten_dlopen_js: function(filename, flags, user_data, onsuccess, onerror) {
|
195 |
| - abort("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking"); |
| 207 | + abort(dlopenMissingError); |
196 | 208 | },
|
197 | 209 | _dlsym_js: function(handle, symbol) {
|
198 |
| - abort("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking"); |
| 210 | + abort(dlopenMissingError); |
199 | 211 | },
|
200 | 212 | #else // MAIN_MODULE != 0
|
201 | 213 | // dynamic linker/loader (a-la ld.so on ELF systems)
|
|
0 commit comments