tree: c3cdc572a2210a9a5f9910c04502393f2d9bb625 [path history] [tgz]
  1. compiler-rt/
  2. embind/
  3. fetch/
  4. gl/
  5. html5/
  6. libc/
  7. libcxx/
  8. libcxxabi/
  9. libunwind/
  10. pkgconfig/
  11. pthread/
  12. standalone/
  13. wasmfs/
  14. webgpu/
  15. websocket/
  16. al.c
  17. asan_js.c
  18. dlmalloc.c
  19. emmalloc.c
  20. jsmath.c
  21. README.md
  22. sbrk.c
  23. stb_image.c
  24. update_compiler_rt.py
  25. update_libcxx.py
  26. update_libcxxabi.py
  27. update_musl.py
system/lib/README.md

Source code for C/C++ system libaries

This directory contains the source code for libc, libc++ and other C/C++ system libraries. Where possible these are clones of upstream projects (e.g. musl). For more details about each library see the individual readme files in the subdirectoris.

Static constructor ordering

These are several static constructors in the emscripten system libraries and they are in a specific order. When adding/remove/updating these please update this document.

These current set of static constructors in system libraries and their priorities (lowest run first) are:

  • 47: initialize_emmalloc_heap (emmalloc.c)
  • 48: __emscripten_init_main_thread (pthread/library_pthread.c)
  • 50: asan init (??)

Priorities 0 - 100 are reserved for system libraries and user-level constructors should all run at 101 and above (for example libc++ initializes its standard I/O streams at priority 101).