Commit 01f9abbb authored by Hans Wennborg's avatar Hans Wennborg
Browse files

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
parent b17f2920
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -254,7 +254,7 @@ bool CrashRecoveryContext::RunSafely(function_ref<void()> Fn) {
// XP, so if support for older versions of Windows is required,
// it will have to be added.

#include "Windows/WindowsSupport.h"
#include "llvm/Support/Windows/WindowsSupport.h"

static LONG CALLBACK ExceptionHandler(PEXCEPTION_POINTERS ExceptionInfo)
{
+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@
#include <string>

#ifdef _WIN32
#include "Windows/WindowsSupport.h"
#include "llvm/Support/Windows/WindowsSupport.h"
#endif

using namespace llvm;
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#ifdef _WIN32
#include "Windows/WindowsSupport.h"
#include "llvm/Support/Windows/WindowsSupport.h"
#else
#include "Unix/Unix.h"
#endif
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@
//
//===----------------------------------------------------------------------===//

#include "WindowsSupport.h"
#include "llvm/Support/Windows/WindowsSupport.h"
#include "llvm/Support/ConvertUTF.h"
#include "llvm/Support/raw_ostream.h"

Loading