Page MenuHomePhabricator

[COFF] Check errorCount before committing the output file
ClosedPublic

Authored by mstorsjo on Tue, Aug 20, 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

Repository
rL LLVM

Event Timeline

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

lgtm

This revision is now accepted and ready to land.Tue, Aug 20, 1:00 PM
This revision was automatically updated to reflect the committed changes.
ruiu added a comment.Tue, Aug 20, 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.