[PATCH] D57909: [WebAssembly] Don't generate invalid modules when function signatures mismatch
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 7 15:58:01 PST 2019
sbc100 added a comment.
In D57909#1389855 <https://reviews.llvm.org/D57909#1389855>, @ruiu wrote:
> How can you fix the CMake issue you mentioned by this change? If CMake checks only if a source file compiles, then this patch doesn't change the behavior (previously we created a broken module but it at least links). If CMake actually tries to run a function, then previously it fails at load-time, and with this patch it would fail when a program attempt to execute a function. So, looks like the behavior observed by CMake doesn't change that much. What am I missing?
You are right, I'm sorry, there is a little more to the story: The emscripten toolchain driver "emcc" runs a post-link tool after lld which will fail (quite rightly) when given an invalid module.
I think its pretty safe to say we should never generate invalid modules anyway, so even without this issue I would say the current state is broken.
Repository:
rLLD LLVM Linker
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57909/new/
https://reviews.llvm.org/D57909
More information about the llvm-commits
mailing list