<div dir="ltr"><div><div>Previously, the COFF driver would call exit(1) from the<br>ErrorHandler in the case of a link error, even if<br></div>CanExitEarly=false was specified. Now it initializes<br></div>the ErrorHandler in the same way that the ELF driver does.<br><div><div><div><div><br>diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp<br>index 0e7db7b6ae3..df1ce324055 100644<br>--- a/lld/COFF/Driver.cpp<br>+++ b/lld/COFF/Driver.cpp<br>@@ -57,6 +57,7 @@ bool link(ArrayRef<const char *> Args, bool CanExitEarly, raw_ostream &Diag) {<br>   errorHandler().ErrorLimitExceededMsg =<br>       "too many errors emitted, stopping now"<br>       " (use /ERRORLIMIT:0 to see all errors)";<br>+  errorHandler().ExitEarly = CanExitEarly;<br>   Config = make<Configuration>();<br>   Config->Argv = {Args.begin(), Args.end()};<br>   Config->CanExitEarly = CanExitEarly;<br></div></div></div></div></div>