diff --git a/lld/COFF/LTO.cpp b/lld/COFF/LTO.cpp --- a/lld/COFF/LTO.cpp +++ b/lld/COFF/LTO.cpp @@ -76,7 +76,11 @@ c.RelocModel = Reloc::Static; else c.RelocModel = Reloc::PIC_; +#ifndef NDEBUG + c.DisableVerify = false; +#else c.DisableVerify = true; +#endif c.DiagHandler = diagnosticHandler; c.OptLevel = config->ltoo; c.CPU = getCPUStr();