Skip to content

Commit

Permalink
Fix host compiler when cross OS DAC compiling (dotnet#31775)
Browse files Browse the repository at this point in the history
* Fix duplicate type definition MINIDUMP_TYPE

The Windows headers define MINIDUMP_TYPE. Do not define when using a
Windows HOST.

* Define DLLEXPORT macro as empty on Windows hosts

* Prefer HOST_WINDOWS to !HOST_UNIX
  • Loading branch information
sdmaclea authored Feb 5, 2020
1 parent c44edc1 commit 0ae4902
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/coreclr/src/debug/inc/dump/dumpcommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef DEBUGGER_DUMPCOMMON_H
#define DEBUGGER_DUMPCOMMON_H

#ifdef TARGET_UNIX
#ifdef HOST_UNIX
typedef enum _MINIDUMP_TYPE {
MiniDumpNormal = 0x00000000,
MiniDumpWithDataSegs = 0x00000001,
Expand All @@ -32,7 +32,7 @@ typedef enum _MINIDUMP_TYPE {
MiniDumpWithAvxXStateContext = 0x00200000,
MiniDumpValidTypeFlags = 0x003fffff,
} MINIDUMP_TYPE;
#endif // TARGET_UNIX
#endif // HOST_UNIX

#if defined(DACCESS_COMPILE) || defined(RIGHT_SIDE_COMPILE)

Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/src/inc/crtwrap.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <wchar.h>
#include <stdio.h>

#ifndef TARGET_UNIX
#ifdef HOST_WINDOWS
// CoreCLR.dll uses linker .def files to control the exported symbols.
// Define DLLEXPORT macro as empty on Windows.
#define DLLEXPORT
Expand Down

0 comments on commit 0ae4902

Please sign in to comment.