Skip to content

Clearer linker error due to sjlj ABI mismatch? #23732

@hoodmane

Description

@hoodmane

Source file:

#include <setjmp.h>

jmp_buf buf;

int main() {
    longjmp(buf, 8);
}

Compile/link:

$ emcc -c a.c
$ emcc a.o -fwasm-exceptions
error: undefined symbol: emscripten_longjmp (referenced by root reference (e.g. compiled C/C++ code

Would be nice if the error could say something roughly like:

a.o uses setjmp/longjmp but was compiled with incompatible ABI. Pass -fwasm-exceptions as a compile flag.

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