Update SPCL to use GeneratedDllImport where possible.#61640
Update SPCL to use GeneratedDllImport where possible.#61640AaronRobinsonMSFT merged 3 commits intodotnet:mainfrom
Conversation
jkoritzinsky
left a comment
There was a problem hiding this comment.
Can you make sure to run the code-fix on the other target OSes of System.Private.CoreLib as well so we can catch the Linux and MacOS P/Invokes too? I think if you set the TargetOS environment variable before opening VS, you'll be able to override the target OS. Or you can change
Line 21 in 25da88c
What remains that's not possible? Do we have a plan to get to 100%, whether by improving the source generator or by changing the P/Invoke signatures or both? |
@stephentoub The biggest change is the blittable signatures with |
|
This also doesn't include converting QCalls. Now that @jkoritzinsky has updated how the runtime handles QCalls, we should be able to do another pass over SPCL to convert those as well. There are also a couple of other things like |
|
Thanks.
But we should be able to update any use of those to not need them, right (or decide to update GeneratedDllImport to support them)? I'm just trying to nudge us to a place where a) we've proven that GeneratedDllImport reasonably can be used exclusively instead of DllImport (using our vast numbers of DllImports in dotnet/runtime as a proxy for real-world usage) and b) we ship .NET 7 without having to generate any stubs at run-time. |
|
arm64 regressions (since fixed): |
|
Improvements on windows-arm64: dotnet/perf-autofiling-issues#2555 |

/cc @jkoritzinsky @elinor-fung