diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp index 1aaec355c7a5..0f3d8fb0b4ef 100644 --- a/lld/COFF/Driver.cpp +++ b/lld/COFF/Driver.cpp @@ -57,6 +57,7 @@ bool link(ArrayRef Args, bool CanExitEarly, raw_ostream &Diag) { errorHandler().ErrorLimitExceededMsg = "too many errors emitted, stopping now" " (use /ERRORLIMIT:0 to see all errors)"; + errorHandler().ExitEarly = CanExitEarly; Config = make(); Config->Argv = {Args.begin(), Args.end()}; Config->CanExitEarly = CanExitEarly;