Skip to content

no way for applications to detect pthread in configure time #607

@yamt

Description

@yamt

a recent change moved pthread_create for wasm32-wasip1 to libc.
it broke configure-time detection of pthread like cmake FindThreads.

FindThreads internally uses CheckLibraryExists, which attempts to detect pthread_create symbol, building an equivalent of the following program.

int main(int argc, char **argv)
{
    pthread_create();
}

as it doesn't include pthread.h at all, _WASI_STRICT_PTHREAD has no chance to work it around.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions