Skip to content

unable to give explicit import module with wasi-sdk #110

@gnanasekar-somanathan

Description

@gnanasekar-somanathan

Hi, have a simple c program
test.c like below

#define TEST_IMPORT __attribute__((__import_module__("foo"), __import_name__("bar")))
int __bar() TEST_IMPORT __attribute__((__warn_unused_result));
int main(int argc, char** argv) {
__bar();
return 0;
}

When wasi-sdk Clang test.c get below error
wasm-ld: error: /tmp/application-c6fef0.o: undefined symbol: __bar

Shouldn't it generate a wasm module which has following import
(import "foo" "bar" (func $bar (result i32)))
Assuming foo module is implemented intrinsically in wasmtime.

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