Fixes in corehost for building x86 arch.

Set the calling convention to '__stdcall' explicitly else the default is
'_cdecl' on windows which mismatches with coreclr hosting APIs.
Use the newly built 'corehost' in stage1.
This commit is contained in:
Sridhar Periyasamy 2016-02-18 18:03:26 -08:00
parent 61489aef6c
commit f96ac6ed92
2 changed files with 7 additions and 3 deletions

View file

@ -195,6 +195,10 @@ namespace Microsoft.DotNet.Cli.Build
}
}
// dotnet.exe is from stage0. But we must be using the newly built corehost in stage1
File.Delete(Path.Combine(binDir, $"dotnet{Constants.ExeSuffix}"));
File.Copy(Path.Combine(binDir, $"corehost{Constants.ExeSuffix}"), Path.Combine(binDir, $"dotnet{Constants.ExeSuffix}"));
// Crossgen Roslyn
var result = Crossgen(c, binDir);
if (!result.Success)

View file

@ -9,7 +9,7 @@
static pal::dll_t g_coreclr = nullptr;
// Prototype of the coreclr_initialize function from coreclr.dll
typedef pal::hresult_t(*coreclr_initialize_fn)(
typedef pal::hresult_t(__stdcall *coreclr_initialize_fn)(
const char* exePath,
const char* appDomainFriendlyName,
int propertyCount,
@ -19,12 +19,12 @@ typedef pal::hresult_t(*coreclr_initialize_fn)(
unsigned int* domainId);
// Prototype of the coreclr_shutdown function from coreclr.dll
typedef pal::hresult_t(*coreclr_shutdown_fn)(
typedef pal::hresult_t(__stdcall *coreclr_shutdown_fn)(
coreclr::host_handle_t hostHandle,
unsigned int domainId);
// Prototype of the coreclr_execute_assembly function from coreclr.dll
typedef pal::hresult_t(*coreclr_execute_assembly_fn)(
typedef pal::hresult_t(__stdcall *coreclr_execute_assembly_fn)(
coreclr::host_handle_t hostHandle,
unsigned int domainId,
int argc,