[llvm] 0d17410 - Prevent building with MSVC 14.24
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 28 07:11:15 PST 2020
Author: Nico Weber
Date: 2020-01-28T10:11:06-05:00
New Revision: 0d17410e919124b3a9194b9bdbe2ce39dd779941
URL: https://github.com/llvm/llvm-project/commit/0d17410e919124b3a9194b9bdbe2ce39dd779941
DIFF: https://github.com/llvm/llvm-project/commit/0d17410e919124b3a9194b9bdbe2ce39dd779941.diff
LOG: Prevent building with MSVC 14.24
MSVC 14.24 miscompiles some of LLVM's code, which makes at least these tests fail:
LLVM :: MC/MachO/gen-dwarf-cpp.s
LLVM :: MC/MachO/gen-dwarf-macro-cpp.s
LLVM :: MC/MachO/gen-dwarf-producer.s
LLVM :: MC/MachO/gen-dwarf.s
It seems better to diagnose that at build time. Since both the previous
and the next version have a fix, this might be good enough and we might
not need a real workaround. (We ran into this at
https://crbug.com/1045948)
If you hit this, use either a newer or an older version of MSVC,
or use clang-cl as host compiler.
Differential Revision: https://reviews.llvm.org/D73550
Added:
Modified:
llvm/include/llvm/Support/Compiler.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Support/Compiler.h b/llvm/include/llvm/Support/Compiler.h
index 34d8ed8baf2d..a583b2d547ad 100644
--- a/llvm/include/llvm/Support/Compiler.h
+++ b/llvm/include/llvm/Support/Compiler.h
@@ -24,6 +24,13 @@
#if defined(_MSC_VER)
#include <sal.h>
+
+#if _MSC_VER == 1924
+// See https://developercommunity.visualstudio.com/content/problem/845933/miscompile-boolean-condition-deduced-to-be-always.html
+// and thread "[llvm-dev] Longstanding failing tests - clang-tidy, MachO, Polly"
+// on llvm-dev Jan 21-23 2020.
+#error "MSVC 19.24 version of MSVC is known to miscompile LLVM."
+#endif
#endif
#ifndef __has_feature
More information about the llvm-commits
mailing list