diff options
Diffstat (limited to 'src/vm/clsload.cpp')
-rw-r--r-- | src/vm/clsload.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vm/clsload.cpp b/src/vm/clsload.cpp index f1fbe57ba7..5af8f19c28 100644 --- a/src/vm/clsload.cpp +++ b/src/vm/clsload.cpp @@ -100,8 +100,9 @@ PTR_Module ClassLoader::ComputeLoaderModuleWorker( #ifndef DACCESS_COMPILE #ifdef FEATURE_NATIVE_IMAGE_GENERATION - // Check we're NGEN'ing - if (IsCompilationProcess()) + // Check we're NGEN'ing. ComputeLoaderModuleForCompilation algorithm assumes that there is fragile + // NGen image for CoreLib that is not the case for ReadyToRun compilation. + if (IsCompilationProcess() && !IsReadyToRunCompilation()) { RETURN(ComputeLoaderModuleForCompilation(pDefinitionModule, token, classInst, methodInst)); } |