Preserve and pack the Android symbols#3374
Merged
mattleibow merged 3 commits intomainfrom Oct 10, 2025
Merged
Conversation
|
Triage Summary Labels will be applied to indicate improvements and changes on theAndroid and Windows platforms, specifically in relation to the native asset packaging and symbol extraction process, as well as refactoring for SkiaSharp. This issue is not identified as a regression as it does not mention compatibility issues with previous versions or reliability concerns. Additional remarks:
Detailed Summary and ActionsSummary of the triage:
Summary of the actions that will be performed:
This entire triage process was automated by AI and mistakes may have been made. Please let us know so we can continue to improve. |
jonpryor
approved these changes
Oct 8, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request refactors the native asset packaging logic for SkiaSharp and HarfBuzzSharp to unify and modernize how native binaries and debug symbols are handled across platforms, especially for Android and Windows. The changes introduce a new, consistent property and item group for native asset projects, update build scripts to extract and package debug symbols, and streamline symbol handling in NuGet packaging.
Native asset packaging unification:
Replaced platform-specific project property
IsWindowsNativeAssetswith a unifiedIsNativeAssetsProjectproperty in all relevant.csprojfiles, and standardized the item group fromNativeWindowsPackageFile/PackageFiletoNativeAssetPackageFilefor both Android and Windows projects. (binding/SkiaSharp.NativeAssets.Win32/SkiaSharp.NativeAssets.Win32.csproj,binding/SkiaSharp.NativeAssets.WinUI/SkiaSharp.NativeAssets.WinUI.csproj,binding/SkiaSharp.NativeAssets.NanoServer/SkiaSharp.NativeAssets.NanoServer.csproj,binding/HarfBuzzSharp.NativeAssets.Win32/HarfBuzzSharp.NativeAssets.Win32.csproj,binding/HarfBuzzSharp.NativeAssets.Android/HarfBuzzSharp.NativeAssets.Android.csproj,binding/SkiaSharp.NativeAssets.Android/SkiaSharp.NativeAssets.Android.csproj) [1] [2] [3] [4] [5] [6]Updated
NativeAssets.Build.targetsto use the new property and item group, ensuring all platforms use the same logic for including native binaries and symbols in NuGet packages. This includes improved symbol file handling for both.pdband.dbgfiles. (binding/NativeAssets.Build.targets)Android build and symbol extraction improvements:
Refactored the Android build script to use a shared
ndk.cakemodule, which now provides functions for alignment checking, symbol extraction, and stripping. The build process now extracts debug symbols into.dbgfiles and links them to the stripped binaries, improving debugging support. (native/android/build.cake,scripts/cake/ndk.cake) [1] [2] [3] [4]Updated Android native build flags to disable automatic stripping, and added debug info flags (
-g -ggdb3) to both SkiaSharp and HarfBuzzSharp builds, ensuring debug symbols are available for extraction. (native/android/libHarfBuzzSharp/jni/Application.mk,native/android/libHarfBuzzSharp/jni/HarfBuzzSharp.mk) [1] [2]NuGet packaging and symbol file support:
SkiaSharp.NuGet.targetsto always allow.pdband.sofiles in the package output, and to include.dbgfiles in the symbols package, ensuring that debug symbols extracted during the build are properly packaged. (source/SkiaSharp.NuGet.targets)Dependency update:
externals/skia)These changes collectively improve the maintainability and debugging experience for native assets across platforms, and provide a more consistent packaging workflow.