Skip compilation for methods with BypassReadyToRun attribute (#516)
authorFadi Hanna <fadim@microsoft.com>
Wed, 4 Dec 2019 21:30:05 +0000 (13:30 -0800)
committerGitHub <noreply@github.com>
Wed, 4 Dec 2019 21:30:05 +0000 (13:30 -0800)
src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs

index cbdbb3c..e9ac2ad 100644 (file)
@@ -195,6 +195,11 @@ namespace Internal.JitInterface
                 // Special methods on delegate types
                 return true;
             }
+            if (method.HasCustomAttribute("System.Runtime", "BypassReadyToRunAttribute"))
+            {
+                // This is a quick workaround to opt specific methods out of ReadyToRun compilation to work around bugs.
+                return true;
+            }
 
             return false;
         }
@@ -635,6 +640,7 @@ namespace Internal.JitInterface
         {
             if (fIsTailPrefix)
             {
+                // FUTURE: Delay load fixups for tailcalls
                 throw new RequiresRuntimeJitException(nameof(fIsTailPrefix));
             }