Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Enable non-blittable struct returns on UnmanagedCallersOnly #45625
Conversation
…e JIT. Block UnmanagedCallersOnly in crossgen1 since the attribute parsing code isn't included.
Now that #39294 is merged, we no longer need to require a stub when we return a non-primitive value type. This PR removes that restriction, which enabled using blittable value type returns with UnmanagedCallersOnly. This PR also enables passing the calling convention from UnmanagedCallersOnly to the JIT at both runtime and during crossgen with crossgen2. This enables the UnmanagedCallersOnly entrypoint to have the correct calling convention even though the entrypoint is technically managed.
This PR blocks crossgenning UnmangedCallersOnly methods in crossgen1 because the custom attribute parsing code is not currently included in crossgen1 and I didn't want to fight to get that hooked up since we're looking at deprecating/removing crossgen1 in the .NET 6 time frame anyway.
Fixes #35928.