[PATCH] D26875: [WebAssembly] Emit .import_global assembler directives
Jacob Gravelle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 28 10:05:11 PST 2016
jgravelle-google added a comment.
In https://reviews.llvm.org/D26875#600723, @sunfish wrote:
> I was imagining that we'd eventually want to just take all undefined global symbols and automatically generate imports for them. Do you think this would work?
In my mind this makes it more explicit what the intent is, whereas auto-generating imports makes it unclear whether an undefined symbol is an error, or if it will be linked in, and we won't know until run-time. Even then we won't know whether the module is trying to import an invalid symbol, or whether the environment isn't providing that symbol. To me this makes it clearer what the module expects.
Although long-term we want to be outputting nearly-valid wasm as part of our .o format. I think at that point we'd still want to explicitly model imports/exports.
https://reviews.llvm.org/D26875
More information about the llvm-commits
mailing list