Skip to content

using import_name in wasm32 target causes undefined symbols if it matches a builtin #153438

@lesleyrs

Description

@lesleyrs

little example: https://github.com/lesleyrs/builtin-fail

When there are 2 symbols available (builtin and import_name) it unexpectedly causes undefined symbol linking error.

There's no great workaround for this, because the existing builtins change per clang version, so if you decided to do specific -fno-builtin-xxx that could fail to compile on newer clang versions.

I think it's best for builtin to just override the import_name the same way that builtins override other funcs, especially since the builtin math funcs only appear when math.h is included. (I'm importing math funcs from JS)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions