llvm-ar: Fix MinGW compilation
authorHans Wennborg <hans@chromium.org>
Fri, 28 Feb 2020 08:59:24 +0000 (09:59 +0100)
committerHans Wennborg <hans@chromium.org>
Fri, 28 Feb 2020 08:59:24 +0000 (09:59 +0100)
commit01f9abbb50b11dd26b9ccb7cb565cc955d2b9c74
tree51875e0f67d0e251e54b1468eea62624805c7195
parentb17f29201089131bf97de21606097e963ca8614d
llvm-ar: Fix MinGW compilation

llvm-ar is using CompareStringOrdinal which is available
only starting with Windows Vista (WINVER 0x600).

Fix this by hoising WindowsSupport.h, which sets _WIN32_WINNT
to 0x0601, up to llvm/include/llvm/Support and use it in llvm-ar.

Patch by Cristian Adam!

Differential revision: https://reviews.llvm.org/D74599
15 files changed:
llvm/include/llvm/Support/Windows/WindowsSupport.h [moved from llvm/lib/Support/Windows/WindowsSupport.h with 100% similarity]
llvm/lib/Support/CrashRecoveryContext.cpp
llvm/lib/Support/InitLLVM.cpp
llvm/lib/Support/RandomNumberGenerator.cpp
llvm/lib/Support/Windows/DynamicLibrary.inc
llvm/lib/Support/Windows/Host.inc
llvm/lib/Support/Windows/Memory.inc
llvm/lib/Support/Windows/Path.inc
llvm/lib/Support/Windows/Process.inc
llvm/lib/Support/Windows/Program.inc
llvm/lib/Support/Windows/Signals.inc
llvm/lib/Support/Windows/ThreadLocal.inc
llvm/lib/Support/Windows/Threading.inc
llvm/lib/Support/raw_ostream.cpp
llvm/tools/llvm-ar/llvm-ar.cpp