Skip to content

IMPORTED_TABLE setting to import function pointer table? #26217

@hoodmane

Description

@hoodmane

Could we add an -sIMPORTED_TABLE setting?

Since -sRELOCATABLE is no longer the default, I've been getting problems with this code:
https://github.com/python/cpython/blob/main/Python/emscripten_trampoline.c#L35
because wasmTable and wasmMemory are undefined. Here I want to define an import via a separate wasm module so that we can use a fall back if wasm-gc is not supported. That module needs the table and the memory. I want to use it as a direct import, so I need to compile the other wasm module before the main wasm module is compiled. Thus, it needs both the table and the memory to be imported. I can force the memory to be imported with -sIMPORTED_MEMORY, but I need a separate setting for the table.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions