diff options
| author | Sam Clegg <sbc@chromium.org> | 2018-06-21 00:12:25 +0000 |
|---|---|---|
| committer | Sam Clegg <sbc@chromium.org> | 2018-06-21 00:12:25 +0000 |
| commit | 1369dfa30b1487540aa86532fb2d371924ffab52 (patch) | |
| tree | 1bf6fb144fa1a4f013272992869cade3f3866f30 /lld/wasm/Driver.cpp | |
| parent | 90ae9677e7825ef99ef8c3bd617882dbc73f81f8 (diff) | |
| download | bcm5719-llvm-1369dfa30b1487540aa86532fb2d371924ffab52.tar.gz bcm5719-llvm-1369dfa30b1487540aa86532fb2d371924ffab52.zip | |
[WebAssembly] Error on mismatched function signature in final output
During symbol resolution, emit warnings for function signature
mismatches. During GC, if any mismatched symbol is marked as live
then generate an error.
This means that we only error out if the mismatch is written to the
final output. i.e. if we would generate an invalid wasm file.
Differential Revision: https://reviews.llvm.org/D48394
llvm-svn: 335192
Diffstat (limited to 'lld/wasm/Driver.cpp')
| -rw-r--r-- | lld/wasm/Driver.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lld/wasm/Driver.cpp b/lld/wasm/Driver.cpp index 70a36046ad9..c24496c6ecc 100644 --- a/lld/wasm/Driver.cpp +++ b/lld/wasm/Driver.cpp @@ -483,7 +483,8 @@ void LinkerDriver::link(ArrayRef<const char *> ArgsArr) { return; // Do size optimizations: garbage collection - markLive(); + if (Config->GcSections) + markLive(); // Write the result to the file. writeResult(); |

