[PATCH] D63109: lld-link: Reject more than one resource .obj file
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 20 04:02:31 PDT 2019
mstorsjo added a comment.
In D63109#1621645 <https://reviews.llvm.org/D63109#1621645>, @mstorsjo wrote:
> In D63109#1621146 <https://reviews.llvm.org/D63109#1621146>, @thakis wrote:
>
> > In D63109#1558181 <https://reviews.llvm.org/D63109#1558181>, @mstorsjo wrote:
> >
> > > Noted oddities:
> > >
> > > - When lld-link produces an error in these cases (faced with two resource obj files), the output exe file is still present on disk though, contrary to link.exe
> >
> >
> >
>
>
> The issue where lld errors out due to multiple resource objects, but the output file is left on disk, is something I haven't looked at (or tried to reproduce) yet.
It turned out this was the common design that on `error()`, lld continues (to gather as many possible error messages for the user) until a later `if (errorCount()) return;` There's no such check between `diagnoseMultipleResourceObjFiles()` and `writeResults()`, and even then, the situation with erroring out but output file left on disk also happens for any other errors that show up during the writeResults phase. (I guess a more correct course of action would be to make sure the output file gets removed in these cases?)
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63109/new/
https://reviews.llvm.org/D63109
More information about the llvm-commits
mailing list