Skip to content

Commit 0d17410

Browse files
committed
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
1 parent 9d212e8 commit 0d17410

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

llvm/include/llvm/Support/Compiler.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@
2424

2525
#if defined(_MSC_VER)
2626
#include <sal.h>
27+
28+
#if _MSC_VER == 1924
29+
// See https://developercommunity.visualstudio.com/content/problem/845933/miscompile-boolean-condition-deduced-to-be-always.html
30+
// and thread "[llvm-dev] Longstanding failing tests - clang-tidy, MachO, Polly"
31+
// on llvm-dev Jan 21-23 2020.
32+
#error "MSVC 19.24 version of MSVC is known to miscompile LLVM."
33+
#endif
2734
#endif
2835

2936
#ifndef __has_feature

0 commit comments

Comments
 (0)