[PATCH] D90428: [WebAssembly] Improved LLD error messages in case of mixed wasm32/wasm64 object files

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 29 15:17:27 PDT 2020


sbc100 added inline comments.


================
Comment at: lld/wasm/InputFiles.cpp:51
+    fatal(toString(file) +
+          ": wasm32 object file can\'t be linked in wasm64 mode");
+  }
----------------
aardappel wrote:
> sbc100 wrote:
> > No need to escape single quote is there?
> > 
> > Can we get tests for these new error cases?
> You want a test that builds two different .o files and tries to link them? Doesn't that sound a bit overkill for this? Do all LLD errors have tests? Certainly the ones we already had that I am replacing didn't.
You thats exactly what I mean.  If the existing error message didn't have tests they should have done. 

It should be trivial to just use and empty `.s` file as the test,  since all you need to do is compile it two ways and try to link it two ways to get each error.

Or you can use a `.test` that references and existing `.s` such as `lld/test/wasm/Inputs/start.s`


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90428/new/

https://reviews.llvm.org/D90428



More information about the llvm-commits mailing list