fix(build): honour --obfuscate and --split-debug-info in tvOS AOT builds#17
Merged
Conversation
The tvOS AOT step invokes gen_snapshot directly (not upstream AOTSnapshotter) and previously dropped the obfuscation flags entirely: release/profile builds succeeded but the App binary kept readable Dart symbols and the --split-debug-info directory stayed empty. Forward --obfuscate, the --dwarf-stack-traces / --resolve-dwarf-paths / --save-debugging-info=<dir>/app.ios-arm64.symbols trio, and any --extra-gen-snapshot-options, matching AOTSnapshotter.build. Extract the arg construction into a testable tvosGenSnapshotArgs helper and add unit tests covering the flag matrix. Bump to 1.1.1. Fixes #10
e4ef077 to
9c30605
Compare
DenisovAV
reviewed
May 28, 2026
DenisovAV
reviewed
May 28, 2026
- Rename the --save-debugging-info file to app.tvos-arm64.symbols (was app.ios-arm64.symbols) so it reads naturally for tvOS crash symbolication. - Pair the obfuscation unit test with split-debug-info, the only combination that reaches the helper (the CLI rejects --obfuscate without --split-debug-info), and document that the helper still emits --obfuscate independently, matching AOTSnapshotter.build.
There was a problem hiding this comment.
Pull request overview
This PR fixes tvOS release/profile (AOT) builds silently ignoring --obfuscate and --split-debug-info by ensuring the tvOS-specific gen_snapshot invocation forwards the same relevant flags/options as upstream Flutter’s AOT snapshotting flow.
Changes:
- Forward
--obfuscate, DWARF/split-debug-info flags, and--extra-gen-snapshot-optionsinto the tvOSgen_snapshotAOT assembly step. - Extract tvOS
gen_snapshotargument construction into a testable helper and add unit tests covering the flag matrix. - Bump package version to
1.1.1and document the fix in the changelog.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
lib/build_targets/application.dart |
Adds split-debug-info directory creation, routes gen_snapshot invocation through tvosGenSnapshotArgs, and forwards obfuscation/DWARF/extra options. |
test/general/tvos_aot_snapshot_test.dart |
New unit tests validating the generated gen_snapshot argument list across obfuscation/split-debug-info/extra-options combinations. |
pubspec.yaml |
Bumps version from 1.1.0 to 1.1.1. |
CHANGELOG.md |
Adds 1.1.1 entry documenting the fix and forwarded flags. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
DenisovAV
approved these changes
May 28, 2026
Contributor
DenisovAV
left a comment
There was a problem hiding this comment.
Both issues addressed: symbols file renamed to app.tvos-arm64.symbols, and the obfuscate-only test documented with the CLI-layer guard explanation. LGTM.
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.
Summary
gen_snapshotdirectly (not upstreamAOTSnapshotter) and previously dropped--obfuscate/--split-debug-infoentirely — release/profile builds completed but theAppbinary kept readable Dart symbols and the split-debug-info directory stayed empty.gen_snapshotinvocation now forwards--obfuscate, the--dwarf-stack-traces/--resolve-dwarf-paths/--save-debugging-info=<dir>/app.ios-arm64.symbolstrio, and any--extra-gen-snapshot-options, matchingAOTSnapshotter.build.tvosGenSnapshotArgshelper; bumped to 1.1.1.Test plan
dart analyze --fatal-infosclean on changed filestest/general/tvos_aot_snapshot_test.dart) cover the flag matrix — 8/8 passingapp.ios-arm64.symbolsis writtenFixes #10