diff options
Diffstat (limited to 'lib/System')
-rw-r--r-- | lib/System/Win32/DynamicLibrary.inc | 12 | ||||
-rw-r--r-- | lib/System/Win32/Process.inc | 8 | ||||
-rw-r--r-- | lib/System/Win32/Signals.inc | 14 |
3 files changed, 26 insertions, 8 deletions
diff --git a/lib/System/Win32/DynamicLibrary.inc b/lib/System/Win32/DynamicLibrary.inc index 310d3dc835..d214ba0e72 100644 --- a/lib/System/Win32/DynamicLibrary.inc +++ b/lib/System/Win32/DynamicLibrary.inc @@ -14,12 +14,18 @@ #include "Win32.h" #ifdef __MINGW32__ -#include <imagehlp.h> + #include <imagehlp.h> #else -#include <dbghelp.h> + #include <dbghelp.h> #endif -#pragma comment(lib, "dbghelp.lib") +#ifdef __MINGW32__ + #if (HAVE_LIBIMAGEHLP != 1) + #error "libimagehlp.a should be present" + #endif +#else + #pragma comment(lib, "dbghelp.lib") +#endif namespace llvm { using namespace sys; diff --git a/lib/System/Win32/Process.inc b/lib/System/Win32/Process.inc index 5b090da3c2..d5e80b4f19 100644 --- a/lib/System/Win32/Process.inc +++ b/lib/System/Win32/Process.inc @@ -16,7 +16,13 @@ #include <malloc.h> #include <io.h> -#pragma comment(lib, "psapi.lib") +#ifdef __MINGW32__ + #if (HAVE_LIBPSAPI != 1) + #error "libpsapi.a should be present" + #endif +#else + #pragma comment(lib, "psapi.lib") +#endif //===----------------------------------------------------------------------===// //=== WARNING: Implementation here must contain only Win32 specific code diff --git a/lib/System/Win32/Signals.inc b/lib/System/Win32/Signals.inc index 333e387dea..a44c034ba1 100644 --- a/lib/System/Win32/Signals.inc +++ b/lib/System/Win32/Signals.inc @@ -16,14 +16,20 @@ #include <vector> #ifdef __MINGW32__ -#include <imagehlp.h> + #include <imagehlp.h> #else -#include <dbghelp.h> + #include <dbghelp.h> #endif #include <psapi.h> -#pragma comment(lib, "psapi.lib") -#pragma comment(lib, "dbghelp.lib") +#ifdef __MINGW32__ + #if ((HAVE_LIBIMAGEHLP != 1) || (HAVE_LIBPSAPI != 1)) + #error "libimagehlp.a & libpsapi.a should be present" + #endif +#else + #pragma comment(lib, "psapi.lib") + #pragma comment(lib, "dbghelp.lib") +#endif // Forward declare. static LONG WINAPI LLVMUnhandledExceptionFilter(LPEXCEPTION_POINTERS ep); |