Skip to content
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

Create managed version of llvm-objcopy #9692

Open
jpobst opened this issue Jan 17, 2025 · 0 comments
Open

Create managed version of llvm-objcopy #9692

jpobst opened this issue Jan 17, 2025 · 0 comments
Labels
Area: App+Library Build Issues when building Library projects or Application projects. Area: Performance Issues with performance.
Milestone

Comments

@jpobst
Copy link
Contributor

jpobst commented Jan 17, 2025

Context: #9455

For each assembly/pdb/config/others file we wrap as a .so in order to place in the /lib directory of an APK, we shell out twice to llvm-objcopy:

llvm-objcopy.EXE --add-section payload=obj\Debug\net9.0-android\android\assets\arm64-v8a\myproject.dll obj\Debug\net9.0-android\android-arm64\wrapped\lib_myproject.dll.so
llvm-objcopy.EXE --set-section-flags payload=readonly,data --set-section-alignment payload=16384 obj\Debug\net9.0-android\android-arm64\wrapped\lib_myproject.dll.so

There is considerable overhead to this process.

In this example we spend ~42 seconds in this step:

dotnet new android
dotnet build -p:EmbedAssembliesIntoApk=true

A managed version that did not need to shell out to external processes of this would likely be faster.

Some potential options:

@jpobst jpobst added Area: App+Library Build Issues when building Library projects or Application projects. Area: Performance Issues with performance. labels Jan 17, 2025
@jpobst jpobst added this to the .NET 10 milestone Jan 17, 2025
@dotnet-policy-service dotnet-policy-service bot added the needs-triage Issues that need to be assigned. label Jan 17, 2025
@jpobst jpobst removed the needs-triage Issues that need to be assigned. label Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: App+Library Build Issues when building Library projects or Application projects. Area: Performance Issues with performance.
Projects
None yet
Development

No branches or pull requests

1 participant