mirror of
https://github.com/python/cpython.git
synced 2026-10-28 18:35:21 +08:00
Adds the ability to build Emscripten statically, so that it can be linked in as an embedded library. Includes a test of the embedding case. --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
15 lines
404 B
C
15 lines
404 B
C
/* Emscripten setup for when Python is the program. Linked into the
|
|
* interpreter only, never into libpython.
|
|
*
|
|
* Runs main() under WebAssembly.promising so that libpython can suspend the
|
|
* wasm stack in a syscall (see Python/emscripten_syscalls.c).
|
|
*/
|
|
|
|
void _PyEmscripten_BeforeMain_js(void);
|
|
|
|
__attribute__((constructor)) void
|
|
_PyEmscripten_BeforeMain(void)
|
|
{
|
|
_PyEmscripten_BeforeMain_js();
|
|
}
|