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
This makes undefined symbol errors more precise by including the name of
the object that references the undefined symbol.
Its also paves the way (in my mind anyway) for finally fixing reverse
dependencies in a salable way. See #15982. That PR uses an alternative
script for the pre-processing of dependencies but also fundamentally
relies on processing JS libraries both before and after linking.
The cost is about 300ms per link operation due to double processing of
the JS libraries. This cost is fixed for most projects (since most
project don't add a lot JS libraries over time in the way that they add
native code object). I imagine even in the most pathological cases JS
libraries usage will be dwarfed by native object file usage so even in
those cases the native linking will likely always dominate the link
time.
If the 300ms extra link time causes issues, for example with cmake or
autoconf, that do a lot linking of small programs, we could consider
hashing the config setting and caching the result of the processing
based on them.
// built with SUPPORT_LONGJMP=1, the object file contains references of not
1259
1259
// longjmp but _emscripten_throw_longjmp, which is called from
1260
1260
// emscripten_longjmp.
1261
-
_emscripten_throw_longjmp: function(){error('longjmp support was disabled (SUPPORT_LONGJMP=0), but it is required by the code (either set SUPPORT_LONGJMP=1, or remove uses of it in the project)');},
1262
1261
get_emscripten_throw_longjmp__deps(){
1263
1262
returnthis.longjmp__deps;
1264
1263
},
1265
1264
#endif
1265
+
_emscripten_throw_longjmp: function(){
1266
+
error('longjmp support was disabled (SUPPORT_LONGJMP=0), but it is required by the code (either set SUPPORT_LONGJMP=1, or remove uses of it in the project)');
1267
+
},
1266
1268
// will never be emitted, as the dep errors at compile time
1267
1269
longjmp: function(env,value){
1268
-
abort('longjmp not supported');
1270
+
abort('longjmp not supported (build with -s SUPPORT_LONGJMP)');
1269
1271
},
1270
-
setjmp: function(env,value){
1271
-
abort('setjmp not supported');
1272
+
setjmp: function(env){
1273
+
abort('setjmp not supported (build with -s SUPPORT_LONGJMP)');
0 commit comments