Skip to content

[Android] Include static native libraries in CoreCLR Android runtime pack #115610

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

Merged

Conversation

kotlarmilos
Copy link
Member

Description

This PR updates the runtime build to ensure that required static native libraries are installed into the sharedFramework and are available in the final runtime pack:

System.Globalization.Native-Static
System.IO.Compression.Native-Static
System.Native-Static
System.Security.Cryptography.Native.Android-Static

Additionally, it excludes Mono static libraries from being linked into sample app.

@Copilot Copilot AI review requested due to automatic review settings May 15, 2025 13:35
@kotlarmilos kotlarmilos self-assigned this May 15, 2025
@kotlarmilos kotlarmilos requested review from grendello and jkoritzinsky and removed request for Copilot May 15, 2025 13:35
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label May 15, 2025
@kotlarmilos kotlarmilos added area-Infrastructure-coreclr os-android and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels May 15, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the CoreCLR Android runtime pack to include required static native libraries and excludes Mono static libraries from sample app linking.

  • Updated the Android build (ApkBuilder.cs) to add filtering for static Mono libraries.
  • Modified multiple CMakeLists.txt files to install native static libraries to the sharedFramework destination on Android.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/tasks/AndroidAppBuilder/ApkBuilder.cs Adjusts logic to filter out Mono static libraries and ensures the native library list is correctly built.
src/native/libs/System.Security.Cryptography.Native.Android/CMakeLists.txt Updates install target to include installation in sharedFramework for Android.
src/native/libs/System.Native/CMakeLists.txt Similar update for System.Native-Static installation on Android.
src/native/libs/System.IO.Compression.Native/CMakeLists.txt Adds install destination for System.IO.Compression.Native-Static in sharedFramework on Android.
src/native/libs/System.Globalization.Native/CMakeLists.txt Adds install destination for System.Globalization.Native-Static in sharedFramework on Android.

Copy link
Contributor

Tagging subscribers to this area: @hoyosjs
See info in area-owners.md if you want to be subscribed.

@steveisok steveisok self-requested a review May 15, 2025 18:47
Copy link
Member

@steveisok steveisok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you happen to run an official build and inspect the artifacts?

@kotlarmilos
Copy link
Member Author

Did you happen to run an official build and inspect the artifacts?

Yes, I ran the unified VMR build.

@kotlarmilos kotlarmilos merged commit 7c25dd9 into dotnet:main May 17, 2025
154 of 158 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants