-
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
[NativeAOT] Fix iOS library build by linking standard C++ library by default #92114
Conversation
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsThis PR fixes building an iOS-like NativeAOT libraries by linking standard C++ library by default. Recently we started statically linking ICU libraries when targeting iOS-like platforms in: #90430
This is not visible when build iOS apps, as we use NativeAOT with iOS in library mode is not officially supported (this is tracked in: #88737), but this fix is a prerequisite of going in the right direction and unblocking customers who are using the experimental support. The official support for iOS library mode will come in a separate PR. Fixes: #91997
|
/cc: @steveisok |
/azp run runtime-ioslike |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ivanpovazan @rolfbjarne this doesn't clash with anything in the iOS sdk, right?
I do not think it should. I manually tested building/running a MAUI iOS sample app by explicitly passing |
It shouldn't, at most we'd pass the same linker argument twice to the native linker. |
src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
Outdated
Show resolved
Hide resolved
src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
/backport to release/8.0 |
Started backporting to release/8.0: https://github.com/dotnet/runtime/actions/runs/6201366248 |
/azp run runtime-ioslike |
Azure Pipelines successfully started running 1 pipeline(s). |
The failures are unrelated and are being tracked. |
This PR fixes building an iOS-like NativeAOT libraries by linking standard C++ library by default.
Recently we started statically linking ICU libraries when targeting iOS-like platforms in: #90430
However globalization and ICU support has a dependency on the standard C++ lib which is not included by NativeAOT build integration targets and produces a build error when trying to build NativeAOT iOS library:
This is not visible when build iOS apps, as we use
AppleAppBuilder
andXamarin
application bundlers that are taking care of native linking.NativeAOT with iOS in library mode is not officially supported (this is tracked in: #88737), but this fix is a prerequisite of going in the right direction and unblocking customers who are using the experimental support. The official support for iOS library mode will come in a separate PR.
Fixes: #91997