#include <utilcode.h>
#include <corhost.h>
#include <configuration.h>
+#include "../../vm/ceemain.h"
#ifdef FEATURE_GDBJIT
#include "../../vm/gdbjithelpers.h"
#endif // FEATURE_GDBJIT
// Holder for const wide strings
typedef NewArrayHolder<const WCHAR> ConstWStringHolder;
-// Specifies whether coreclr is embedded or standalone
-extern bool g_coreclr_embedded;
-
-// Specifies whether hostpolicy is embedded in executable or standalone
-extern bool g_hostpolicy_embedded;
-
// Holder for array of wide strings
class ConstWStringArrayHolder : public NewArrayHolder<LPCWSTR>
{
// Stronger than IsGCHeapInitialized
BOOL IsGarbageCollectorFullyInitialized();
+// Specifies whether coreclr is embedded or standalone
+extern bool g_coreclr_embedded;
+
+// Specifies whether hostpolicy is embedded in executable or standalone
+extern bool g_hostpolicy_embedded;
#endif
sAppPaths));
}
-#if defined(TARGET_UNIX) && !defined(CORECLR_EMBEDDED)
- // Check if the current code is executing in the single file host or in libcoreclr.so. The libSystem.Native is linked
- // into the single file host, so we need to check only when this code is in libcoreclr.so.
- // Preload the libSystem.Native.so/dylib to detect possible problems with loading it early
- EX_TRY
- {
- NativeLibrary::LoadLibraryByName(W("libSystem.Native"), SystemDomain::SystemAssembly(), FALSE, 0, TRUE);
- }
- EX_HOOK
+#if defined(TARGET_UNIX)
+ if (!g_coreclr_embedded)
{
- Exception *ex = GET_EXCEPTION();
- SString err;
- ex->GetMessage(err);
- LogErrorToHost("Error message: %s", err.GetUTF8());
+ // Check if the current code is executing in the single file host or in libcoreclr.so. The libSystem.Native is linked
+ // into the single file host, so we need to check only when this code is in libcoreclr.so.
+ // Preload the libSystem.Native.so/dylib to detect possible problems with loading it early
+ EX_TRY
+ {
+ NativeLibrary::LoadLibraryByName(W("libSystem.Native"), SystemDomain::SystemAssembly(), FALSE, 0, TRUE);
+ }
+ EX_HOOK
+ {
+ Exception *ex = GET_EXCEPTION();
+ SString err;
+ ex->GetMessage(err);
+ LogErrorToHost("Error message: %s", err.GetUTF8());
+ }
+ EX_END_HOOK;
}
- EX_END_HOOK;
-#endif // TARGET_UNIX && !CORECLR_EMBEDDED
+#endif // TARGET_UNIX
*pAppDomainID=DefaultADID;