diff --git a/src/inc/switches.h b/src/inc/switches.h index bb303876e8ae..79964530fad5 100644 --- a/src/inc/switches.h +++ b/src/inc/switches.h @@ -235,3 +235,6 @@ #endif // !defined(CROSSGEN_COMPILE) +#if defined(FEATURE_INTERPRETER) && defined(CROSSGEN_COMPILE) +#undef FEATURE_INTERPRETER +#endif diff --git a/src/vm/tieredcompilation.cpp b/src/vm/tieredcompilation.cpp index 2032e66f1b40..acc26b90a5a9 100644 --- a/src/vm/tieredcompilation.cpp +++ b/src/vm/tieredcompilation.cpp @@ -337,7 +337,11 @@ void TieredCompilationManager::InstallMethodCode(MethodDesc* pMethod, PCODE pCod _ASSERTE(!pMethod->IsNativeCodeStableAfterInit()); PCODE pExistingCode = pMethod->GetNativeCode(); +#ifdef FEATURE_INTERPRETER + if (!pMethod->SetNativeCodeInterlocked(pCode, pExistingCode, TRUE)) +#else if (!pMethod->SetNativeCodeInterlocked(pCode, pExistingCode)) +#endif { //We aren't there yet, but when the feature is finished we shouldn't be racing against any other code mutator and there would be no //reason for this to fail