-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS (and other Apple platforms): System.Private.CoreLib.dll has P/Invokes to a libhostpolicy library that isn't shipped #38543
Comments
Tagging subscribers to this area: @CoffeeFlux |
/cc @vitek-karas |
@rolfbjarne this should not matter a lot as they will be removed by illinker @CoffeeFlux would be nice to clean this up |
The linker won't always be enabled, in particular for simulator builds. There's another complication here, because sometimes we have to ask the native linker to keep the native symbols P/Invokes point to (because otherwise the native linker may remove them, if those symbols come from static libraries). The problem is that if there are P/Invokes to native functions that don't exist, we can't ask the native linker to keep them, because then the native linker will fail. This means we'll have to add code to inspect all the static libraries we link with, compute a list of all the native symbols, and match with the symbols P/Invokes point to, to avoid asking the native linker to keep native symbols that don't exist. |
…ibrary. System.Private.CoreLib.dll contains P/Invokes to a libhostpolicy library, which isn't shipped. An isssue has been filed to fix this in the runtime: dotnet/runtime#38543
Still present with P3
|
The existing implementation of On platforms where we don't use I would imagine that on mobile, we might just throw - as dynamically loaded plugins with dependency resolution may not be a thing (or are not common enough to invest into implementing some standard behavior). On CoreCLR proper - the class parses the |
Addressed in #54601 |
Description
The System.Private.CoreLib.dll has P/Invokes to libhostpolicy:
But there's no libhostpolicy library in the Microsoft.NETCore.Runtime.ios-x64 nuget (nor are these native functions provided by any other library that I can find).
Other information
It's highly preferable to not have any P/Invokes to native functions that don't exist, because it allows the AOT compiler to generate more efficient code. It also makes other performance improvements possible.
The text was updated successfully, but these errors were encountered: