Skip to content

Failed to execute llvm-box #27

Description

@windowsair

Hi, thanks for the very cool work you do!

I'm having some problems with the llvm-box. I noticed that the llvm-box did not have any console output at runtime, and the exit code was always 1. So I modified the llvm-box wrapper like this :

int main(int argc, const char ** argv) {
    printf("hello,world"); // add this
    if (argc < 1) return 2; // change this

    const char * argv0 = argv[0];

    --argc;
    ++argv;

    #include "llvm-box-entry-gen.hpp"

    fprintf(stderr, "LLVM command \"%s\" not found", argv0);

    return 1;
}

It can be sure that argv is set, but the exit code is still 1 and printf("hello,word") doesn't output anything. Testing with my own wasm hello world program outputs it correctly.

I'm not an expert on wasm, am I doing something wrong? Thank you.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions