diff options
author | Ben Pye <ben@curlybracket.co.uk> | 2015-07-27 13:48:31 +0100 |
---|---|---|
committer | Ben Pye <ben@curlybracket.co.uk> | 2015-07-27 14:40:59 +0100 |
commit | 085cff4715d4e8c4efa6eb476d5d97c88b926868 (patch) | |
tree | 9462be1d0895b996d9cfa4bd0f3a5fa723277aff /src/dlls | |
parent | a0423ecf2f719b55332a7e4e3f8d5f9d71a9ca56 (diff) | |
download | coreclr-085cff4715d4e8c4efa6eb476d5d97c88b926868.tar.gz coreclr-085cff4715d4e8c4efa6eb476d5d97c88b926868.tar.bz2 coreclr-085cff4715d4e8c4efa6eb476d5d97c88b926868.zip |
Expose Unix hosting API on Windows
Diffstat (limited to 'src/dlls')
-rw-r--r-- | src/dlls/mscoree/CMakeLists.txt | 5 | ||||
-rw-r--r-- | src/dlls/mscoree/mscorwks_ntdef.src | 6 | ||||
-rw-r--r-- | src/dlls/mscoree/unixinterface.cpp | 11 |
3 files changed, 15 insertions, 7 deletions
diff --git a/src/dlls/mscoree/CMakeLists.txt b/src/dlls/mscoree/CMakeLists.txt index 5959c0af39..7af76fbe6b 100644 --- a/src/dlls/mscoree/CMakeLists.txt +++ b/src/dlls/mscoree/CMakeLists.txt @@ -2,6 +2,7 @@ include_directories("../../inc") set(CLR_SOURCES mscoree.cpp + unixinterface.cpp ) if(WIN32) @@ -15,10 +16,6 @@ set (DEF_SOURCES mscorwks_ntdef.src ) else() -list(APPEND CLR_SOURCES - unixinterface.cpp -) - set (DEF_SOURCES mscorwks_unixexports.src ) diff --git a/src/dlls/mscoree/mscorwks_ntdef.src b/src/dlls/mscoree/mscorwks_ntdef.src index 90da7f9952..dcb68574a9 100644 --- a/src/dlls/mscoree/mscorwks_ntdef.src +++ b/src/dlls/mscoree/mscorwks_ntdef.src @@ -17,6 +17,12 @@ EXPORTS ; This cannot change, or else CoreCLR debugging will not work. ; See clr\src\DLLS\dbgshim\dbgshim.cpp. g_CLREngineMetrics @2 data + + ; Unix hosting API + coreclr_create_delegate + coreclr_execute_assembly + coreclr_initialize + coreclr_shutdown #ifdef FEATURE_PREJIT ; MetaDataGetDispenser is needed for nidump. We want nidump to work on non-debug diff --git a/src/dlls/mscoree/unixinterface.cpp b/src/dlls/mscoree/unixinterface.cpp index 5c5e1dacc7..b02ce52576 100644 --- a/src/dlls/mscoree/unixinterface.cpp +++ b/src/dlls/mscoree/unixinterface.cpp @@ -112,8 +112,10 @@ int coreclr_initialize( void** hostHandle, unsigned int* domainId) { + HRESULT hr; +#ifdef FEATURE_PAL DWORD error = PAL_InitializeCoreCLR(exePath); - HRESULT hr = HRESULT_FROM_WIN32(error); + hr = HRESULT_FROM_WIN32(error); // If PAL initialization failed, then we should return right away and avoid // calling any other APIs because they can end up calling into the PAL layer again. @@ -121,6 +123,7 @@ int coreclr_initialize( { return hr; } +#endif ReleaseHolder<ICLRRuntimeHost2> host; @@ -167,7 +170,7 @@ int coreclr_initialize( propertyCount, propertyKeysW, propertyValuesW, - domainId); + (DWORD *)domainId); if (SUCCEEDED(hr)) { @@ -280,12 +283,13 @@ int coreclr_execute_assembly( ConstWStringHolder managedAssemblyPathW = StringToUnicode(managedAssemblyPath); - HRESULT hr = host->ExecuteAssembly(domainId, managedAssemblyPathW, argc, argvW, exitCode); + HRESULT hr = host->ExecuteAssembly(domainId, managedAssemblyPathW, argc, argvW, (DWORD *)exitCode); IfFailRet(hr); return hr; } +#ifdef PLATFORM_UNIX // // Execute a managed assembly with given arguments // @@ -369,3 +373,4 @@ HRESULT ExecuteAssembly( return hr; } +#endif |