Skip to content

Commit

Permalink
Enable CoreCLR init failure logging in single exe host (#80104)
Browse files Browse the repository at this point in the history
* Enable CoreCLR init failure logging in single exe host

When adding the CoreCLR initialization failure logging recently, I have
missed the fact that there are two versions of the coreclr_resolver.cpp.
One for standalone host that I have added support for, but also for linking
into single exe.

This change adds the missing support to the single exe host.

* Remove unnecessary typedef
  • Loading branch information
janvorli committed Jan 4, 2023
1 parent 88f75a8 commit 6c0c96c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/native/corehost/hostpolicy/static/coreclr_resolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ extern "C"
const char* entryPointTypeName,
const char* entryPointMethodName,
void** delegate);

pal::hresult_t STDMETHODCALLTYPE coreclr_set_error_writer(
coreclr_error_writer_callback_fn error_writer);
}


Expand All @@ -49,6 +52,7 @@ bool coreclr_resolver_t::resolve_coreclr(const pal::string_t& libcoreclr_path, c
coreclr_resolver_contract.coreclr_shutdown = reinterpret_cast<coreclr_shutdown_fn>(coreclr_shutdown_2);
coreclr_resolver_contract.coreclr_execute_assembly = reinterpret_cast<coreclr_execute_assembly_fn>(coreclr_execute_assembly);
coreclr_resolver_contract.coreclr_create_delegate = reinterpret_cast<coreclr_create_delegate_fn>(coreclr_create_delegate);
coreclr_resolver_contract.coreclr_set_error_writer = reinterpret_cast<coreclr_set_error_writer_fn>(coreclr_set_error_writer);

return true;
}

0 comments on commit 6c0c96c

Please sign in to comment.