This is an archive of the discontinued LLVM Phabricator instance.

[COFF] Check errorCount before committing the output file
ClosedPublic

Authored by mstorsjo on Aug 20 2019, 12:17 PM.

Details

Summary

This avoids producing an output file if errors appeared late in the linking process (e.g. while fixing relocations, or as in the test, while checking for multiple resources). If an output file is produced, build tools might not retry building it on rebuilds, even if a previous build failed due to the error return code.

Diff Detail

Event Timeline

mstorsjo created this revision.Aug 20 2019, 12:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 20 2019, 12:17 PM
rnk accepted this revision.Aug 20 2019, 1:00 PM

lgtm

This revision is now accepted and ready to land.Aug 20 2019, 1:00 PM
This revision was automatically updated to reflect the committed changes.
ruiu added a comment.Aug 20 2019, 11:45 PM

LGTM

Thanks!

Thanks for doing this! :)

https://llvm.org/viewvc/llvm-project?view=revision&revision=369752 merged this to 9.0, since the dupe res obj file detection is new in 9.0.