Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1827,6 +1827,14 @@ private void resolveToken(ref CORINFO_RESOLVED_TOKEN pResolvedToken)

if (result is MethodDesc method)
{
if (method.IsAsync)
{
#if READYTORUN
throw new RequiresRuntimeJitException("RuntimeAsync methods will be jitted at runtime");
#else
throw new NotImplementedException("RuntimeAsync methods are not supported by nativeaot yet");
#endif
}
pResolvedToken.hMethod = ObjectToHandle(method);

TypeDesc owningClass = method.OwningType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,13 @@ public void CompileMethod(MethodWithGCInfo methodCodeNodeNeedingCode, Logger log
return;
}

if (MethodBeingCompiled.IsAsync)
{
if (logger.IsVerbose)
logger.Writer.WriteLine($"Info: Method `{MethodBeingCompiled}` was not compiled because it is an async method");
return;
}

if (MethodBeingCompiled.GetTypicalMethodDefinition() is EcmaMethod ecmaMethod)
{
if ((methodIL.GetMethodILScopeDefinition() is IEcmaMethodIL && _compilation.SymbolNodeFactory.VerifyTypeAndFieldLayout && ecmaMethod.Module == ecmaMethod.Context.SystemModule) ||
Expand Down
23 changes: 17 additions & 6 deletions src/coreclr/tools/aot/crossgen2.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,24 @@
<Platform Name="x86" />
</Configurations>
<Project Path="crossgen2/crossgen2.csproj">
<Platform Solution="*|Any CPU" Project="x86" />
<BuildDependency Project="ILCompiler.Diagnostics/ILCompiler.Diagnostics.csproj" />
<BuildDependency Project="ILCompiler.Reflection.ReadyToRun/ILCompiler.Reflection.ReadyToRun.csproj" />
<Platform Solution="*|x64" Project="x64" />
<Platform Solution="*|x86" Project="x86" />
<Build Solution="*|Any CPU" Project="false" />
<Platform Solution="Checked|Any CPU" Project="x86" />
<Platform Solution="Debug|Any CPU" Project="x64" />
<Platform Solution="Release|Any CPU" Project="x86" />
<Build Solution="Checked|Any CPU" Project="false" />
<Build Solution="Release|Any CPU" Project="false" />
</Project>
<Project Path="ILCompiler.DependencyAnalysisFramework/ILCompiler.DependencyAnalysisFramework.csproj">
<Platform Solution="*|Any CPU" Project="x86" />
<Platform Solution="*|x64" Project="x64" />
<Platform Solution="*|x86" Project="x86" />
<Build Solution="*|Any CPU" Project="false" />
<Platform Solution="Checked|Any CPU" Project="x86" />
<Platform Solution="Debug|Any CPU" Project="x64" />
<Platform Solution="Release|Any CPU" Project="x86" />
<Build Solution="Checked|Any CPU" Project="false" />
<Build Solution="Release|Any CPU" Project="false" />
</Project>
<Project Path="ILCompiler.Diagnostics/ILCompiler.Diagnostics.csproj">
<BuildType Solution="Checked|*" Project="Debug" />
Expand All @@ -28,10 +36,13 @@
<Build Solution="Checked|Any CPU" Project="false" />
</Project>
<Project Path="ILCompiler.ReadyToRun/ILCompiler.ReadyToRun.csproj">
<Platform Solution="*|Any CPU" Project="x86" />
<Platform Solution="*|x64" Project="x64" />
<Platform Solution="*|x86" Project="x86" />
<Build Solution="*|Any CPU" Project="false" />
<Platform Solution="Checked|Any CPU" Project="x86" />
<Platform Solution="Debug|Any CPU" Project="x64" />
<Platform Solution="Release|Any CPU" Project="x86" />
<Build Solution="Checked|Any CPU" Project="false" />
<Build Solution="Release|Any CPU" Project="false" />
</Project>
<Project Path="ILCompiler.Reflection.ReadyToRun/ILCompiler.Reflection.ReadyToRun.csproj">
<BuildType Solution="Checked|*" Project="Debug" />
Expand Down
Loading