From e1b916260a8be6a13ae72e92a62073a53b55d629 Mon Sep 17 00:00:00 2001 From: Vladislav Sytchenko Date: Mon, 21 Sep 2020 11:47:30 -0400 Subject: [PATCH] Fix Windows legacy LLVM build The os.hpp header gets added to the include path of legacy llvm via the compiler lib. Having "windows.h" included causes a lot conflicts with LLVM headers, as they forward declare many Windows types. Best to not include it here. Change-Id: I60c44a8d28660368f1a4a95741e1053ef3528fa1 --- rocclr/os/os.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rocclr/os/os.hpp b/rocclr/os/os.hpp index 1173e0b2ce..82879dee67 100755 --- a/rocclr/os/os.hpp +++ b/rocclr/os/os.hpp @@ -33,7 +33,6 @@ #ifdef _WIN32 #include // For KAFFINITY -#include #endif // _WIN32 // Smallest supported VM page size. @@ -56,7 +55,7 @@ class Os : AllStatic { // File Desc abstraction between OS #if defined(_WIN32) - typedef HANDLE FileDesc; + typedef void* FileDesc; #else typedef int FileDesc; #endif @@ -104,7 +103,7 @@ class Os : AllStatic { #if defined(__linux__) return -1; #else - return INVALID_HANDLE_VALUE; + return reinterpret_cast(-1); #endif }