diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/TypeMetadataNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/TypeMetadataNode.cs index 87a2c829c0269..6ae29da0e6d22 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/TypeMetadataNode.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/TypeMetadataNode.cs @@ -77,9 +77,11 @@ public override IEnumerable GetStaticDependencies(NodeFacto { try { - // Make sure we're not adding a method to the dependency graph that is going to - // cause trouble down the line. This entire type would not actually load on CoreCLR anyway. - LibraryRootProvider.CheckCanGenerateMethod(method); + // Spot check by parsing signature. + // Previously we had LibraryRootProvider.CheckCanGenerateMethod(method) here, but that one + // expects fully instantiated types and methods. We operate on definitions here. + // This is not as thorough as it could be. This option is unsupported anyway. + _ = method.Signature; } catch (TypeSystemException) {