[lld] 1079f1c - [lld][COFF][LTO] Don't disable verifier in assert builds
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 29 09:00:41 PDT 2022
Author: Arthur Eubanks
Date: 2022-09-29T08:58:38-07:00
New Revision: 1079f1c6eaa686b3010fd7c43cf71fc355ec6e69
URL: https://github.com/llvm/llvm-project/commit/1079f1c6eaa686b3010fd7c43cf71fc355ec6e69
DIFF: https://github.com/llvm/llvm-project/commit/1079f1c6eaa686b3010fd7c43cf71fc355ec6e69.diff
LOG: [lld][COFF][LTO] Don't disable verifier in assert builds
We should catch more issues this way.
This previously the behavior and was dropped in cde5e5b600b06.
Reviewed By: hans
Differential Revision: https://reviews.llvm.org/D134839
Added:
Modified:
lld/COFF/LTO.cpp
Removed:
################################################################################
diff --git a/lld/COFF/LTO.cpp b/lld/COFF/LTO.cpp
index a66cbca6123f3..12ba1976b21e8 100644
--- a/lld/COFF/LTO.cpp
+++ b/lld/COFF/LTO.cpp
@@ -76,7 +76,11 @@ static lto::Config createConfig() {
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();
More information about the llvm-commits
mailing list