Android: Enable native debug symbols generation#105605
Android: Enable native debug symbols generation#105605Repiteo merged 1 commit intogodotengine:masterfrom
Conversation
c29cfac to
087acb6
Compare
|
In my testing, using However, adding My |
There was a problem hiding this comment.
Changes looks good and works in my testing.
debug_symbols=yes generate_android_binaries=yes correctly generate a native-debug-symbols.zip. Adding do_not_strip_android_so=yes also works as expected, generated android editor (arm64) apk size is 328.6 mb.
Have you tested building export templates with |
| /** | ||
| * Generates the same output as generateGodotTemplates but with dev symbols | ||
| */ | ||
| task generateDevTemplate { | ||
| // add parameter to set symbols to true | ||
| project.ext.doNotStrip = "true" | ||
|
|
||
| gradle.startParameter.excludedTaskNames += templateExcludedBuildTask() | ||
| dependsOn = generateBuildTasks("template") | ||
|
|
||
| finalizedBy 'zipGradleBuild' | ||
| } |
There was a problem hiding this comment.
Doesn't this removal mean that it's no longer possible to generate templates with debug symbols unless calling gradle from scons?
There was a problem hiding this comment.
target=template_debug debug_symbols=yes generate_android_binaries=yes does the same thing.
There was a problem hiding this comment.
Yes that's correct. Using scons, as @syntaxerror247 mentioned, will be the way to generate those templates.
This task also had the unforeseen side-effect of always enabling doNotStrip regardless of whether you were running it or not due to how gradle evaluates declared tasks.
|
I tested and can reproduce the issue pointed out by @dsnopek. With: I get: Notably, there's no |
I tried building the template and encountered the same issue. While the |
@akien-mga That's the intended behavior. When |
087acb6 to
8a514ae
Compare
dsnopek
left a comment
There was a problem hiding this comment.
Thanks!
Building with target=template_debug generate_android_binaries=yes debug_symbols=yes gradle_do_not_strip=yes is working as expected for me now :-)
|
Thanks! |
|
Any reason to use |
|
I only found
|
@Summersay415 I went with an Android specific parameter because I wanted to highlight that the debug symbols file generation is tied to the That said, I don't have objections with using |
|
@Summersay415 I've opened #105671 to discuss which parameter to use. |
|
Having just lost a bunch of time to this PR yesterday because I updated and a bunch of automated scripts broke I'm shocked that I understand its a slightly better name but there needs to be a higher bar to be met for renaming things. It makes cherry picking much harder and in cases like this can break existing workflows and cost users time and money. |
|
In such case we could (should) use an alias to preserve support for previous names if they're still doing roughly the same thing. Edit: Done: #106435. |
|
I've been using both parameters for about a month, necessary to switch between different PRs and to test them.
|
Enable native debug symbols generation for Android builds (template & editor)
The native debug symbols generation by
gradleis controlled by thendk.debugSymbolLevelproperty.This PR sets that property to
FULL, which causes both the debug info and symbol tables to be packaged. This results in a native debug symbols zip file which is about~1Gin size for all Android supported arches (arm32,arm64,x86_32,x86_64). The size of the symbols file can be brought down by setting thendk.debugSymbolLevelproperty tosymbol_table, which only packages the symbol tables.Build-scripts counterpart PR - godotengine/godot-build-scripts#112
The build script PR can be used to see how to generate the debug symbols. Here a quick example for the
arm64arch:Alongside generating the Android binaries, the inclusion of the
debug_symbols=yesparameter will generate and output native debug symbols in the outputbindirectory.The generated native debug symbols are stripped from the
*.solibraries bygradle. To keep the debug symbols within the*.sopackaged in the APK/AAB binaries, at the expense of binary size, thegradle_do_not_strip=yesparameter can be used.Note: The
generate_apkscons parameter has been replaced by thegenerate_android_binariesparameter to reflect the fact the command generatesAPK,AAB, andAARbinaries. godotengine/godot-docs#10886 updates the documentation.