This is an archive of the discontinued LLVM Phabricator instance.

[lld][WebAssembly] Improve error reporting for bad ar archive members
ClosedPublic

Authored by sbc100 on Feb 28 2022, 4:33 PM.

Details

Summary

Show the name of of the archive in the error message as well as the name
of the object within it.

Diff Detail

Event Timeline

sbc100 created this revision.Feb 28 2022, 4:33 PM
sbc100 requested review of this revision.Feb 28 2022, 4:33 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 28 2022, 4:33 PM
sbc100 updated this revision to Diff 411928.Feb 28 2022, 4:34 PM
  • whitespace
sbc100 updated this revision to Diff 411929.Feb 28 2022, 4:35 PM
  • require
dschuff added inline comments.Mar 1 2022, 8:26 AM
lld/test/wasm/bad-archive-member.s
2

Why does this need x86? It's a little odd that we are building an x86 object and then linking with wasm-ld?

sbc100 added inline comments.Mar 1 2022, 8:38 AM
lld/test/wasm/bad-archive-member.s
2

Because that is the precise error condition we want to check for here. We need to create a llvm-ar archive with a valid index, but whose objects are no valid under wasm.

dschuff accepted this revision.Mar 1 2022, 11:36 AM
dschuff added inline comments.
lld/test/wasm/bad-archive-member.s
2

oh right, yeah makes sense.

This revision is now accepted and ready to land.Mar 1 2022, 11:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 1 2022, 3:23 PM