Prevent building with MSVC 14.24
authorNico Weber <thakis@chromium.org>
Tue, 28 Jan 2020 15:09:52 +0000 (10:09 -0500)
committerNico Weber <thakis@chromium.org>
Tue, 28 Jan 2020 15:11:06 +0000 (10:11 -0500)
commit0d17410e919124b3a9194b9bdbe2ce39dd779941
tree22bea98f2e0a9a70526315a21d3b3d9da541ca6a
parent9d212e83e920363762eb265293adf0bd6fda5a13
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
llvm/include/llvm/Support/Compiler.h