#endif //FEATURE_HOSTED_BINDER
-#if !defined(DACCESS_COMPILE) && defined(FEATURE_CORECLR)
+#if !defined(DACCESS_COMPILE) && defined(FEATURE_CORECLR) && defined(FEATURE_NATIVE_IMAGE_GENERATION)
void ZapperSetBindingPaths(ICorCompilationDomain *pDomain, SString &trustedPlatformAssemblies, SString &platformResourceRoots, SString &appPaths, SString &appNiPaths)
{
if (WinRTTypeNameConverter::IsRedirectedWinRTSourceType(pMT))
return FALSE;
+#ifdef FEATURE_NATIVE_IMAGE_GENERATION
// Don't cache in a module that's not the NGen target, since the result
// won't be saved, and since the such a module might be read-only.
if (GetAppDomain()->ToCompilationDomain()->GetTargetModule() != this)
return FALSE;
+#endif
return TRUE;
}
#ifndef COMPILE_H_
#define COMPILE_H_
-#ifndef FEATURE_PREJIT
-#error FEATURE_PREJIT is required for this file
-#endif // FEATURE_PREJIT
+#ifdef FEATURE_NATIVE_IMAGE_GENERATION
struct ZapperLoaderModuleTableKey {
ZapperLoaderModuleTableKey(Module *pDefinitionModule,
void SetDependencyEmitter(IMetaDataAssemblyEmit *pEmitter);
};
+#endif // FEATURE_NATIVE_IMAGE_GENERATION
+
#endif // COMPILE_H_
g_pConfig->RequireZaps() == EEConfig::REQUIRE_ZAPS_SUPPORTED)
return FALSE;
+#ifdef FEATURE_NATIVE_IMAGE_GENERATION
if (IsCompilationProcess())
{
// Ignore the assembly being ngened.
if (fileIsBeingNGened)
return FALSE;
}
+#endif
return TRUE;
}
// Different app-domains should make different decisions
hash ^= HashString(this->GetAppDomain()->GetFriendlyName());
+#ifdef FEATURE_NATIVE_IMAGE_GENERATION
// Since DbgRandomOnHashAndExe() is not so random under ngen.exe, also
// factor in the module being compiled
if (this->GetAppDomain()->IsCompilationDomain())
if (module)
hash ^= HashStringA(module->GetSimpleName());
}
+#endif
if (DbgRandomOnHashAndExe(hash, float(stressPercentage)/100))
{
BOOL fInstrument = FALSE;
-#ifdef FEATURE_PREJIT
+#ifdef FEATURE_NATIVE_IMAGE_GENERATION
// This will make sure that when IBC logging is turned on we will go through a version
// of JIT_GenericHandle which logs the access. Note that we still want the dictionaries
// to be populated to prepopulate the types at NGen time.
{
fInstrument = TRUE;
}
-#endif // FEATURE_PREJIT
+#endif // FEATURE_NATIVE_IMAGE_GENERATION
// If we've got a method type parameter of any kind then we must look in the method desc arg
if (pContextMD->RequiresInstMethodDescArg())
if (!pField ||
!pField->IsRVA() ||
(pField->LoadSize() < size)
-#ifdef FEATURE_PREJIT
+#ifdef FEATURE_NATIVE_IMAGE_GENERATION
// This will make sure that when IBC logging is on, the array initialization happens thru
// COMArrayInfo::InitializeArray. This gives a place to put the IBC probe that can help
// separate hold and cold RVA blobs.
|| (IsCompilingForNGen() &&
GetAppDomain()->ToCompilationDomain()->m_fForceInstrument)
-#endif // FEATURE_PREJIT
+#endif // FEATURE_NATIVE_IMAGE_GENERATION
)
{
result = NULL;
JIT_TO_EE_TRANSITION();
-#ifdef FEATURE_PREJIT
+#ifdef FEATURE_NATIVE_IMAGE_GENERATION
// This will make sure that when IBC logging is on, we call the slow helper with IBC probe
if (IsCompilingForNGen() &&
GetAppDomain()->ToCompilationDomain()->m_fForceInstrument)
{
result = CORINFO_HELP_SECURITY_PROLOG_FRAMED;
}
-#endif // FEATURE_PREJIT
+#endif // FEATURE_NATIVE_IMAGE_GENERATION
if (result == CORINFO_HELP_UNDEF)
{