-
Notifications
You must be signed in to change notification settings - Fork 6k
Clean up create_macos_gen_snapshots.py options #53954
Clean up create_macos_gen_snapshots.py options #53954
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
This patch updates `create_macos_gen_snapshots.py` to take the path to the input `gen_snapshot` binaries rather than just the path to the buildroot, and hardcoding the binary names and buildroot-relative paths internally. This has a couple advantages: * Those grepping the source for gen_snapshot to see where it's bundled will immediately find it in the recipe JSON as a parameter to this script. * In future (the next patch I send out) we can pass different input paths that point to gen_snapshot binaries that are universal binaries. The current binaries are single-architecture x64 host binaries. Background ---------- `create_macos_gen_snapshot.py` is used to: * Generate a named copy of gen_snapshot for the specified target architecture: e.g. gen_snapshot_arm64, gen_snapshot_x64 * Strip bitcode, if present. Today, bitcode is no longer enabled by default. * Create a zip archive containing the (two) gen_snapshot binaries and bundle with an entitlements.txt file. This is a refactoring with no semantic change, therefore no tests have changed. Issue: flutter/flutter#151848 This is refactoring to support: Issue: flutter/flutter#101138 Issue: flutter/flutter#69157
christopherfujino
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
test-exempt: code refactor with no semantic change |
…151905) flutter/engine@45b722b...39ee1a5 2024-07-17 [email protected] Clean up create_macos_gen_snapshots.py options (flutter/engine#53954) 2024-07-17 [email protected] Roll Skia from def61bdd977a to 4d2047aa3c8d (1 revision) (flutter/engine#53960) 2024-07-17 [email protected] Roll Dart SDK from 7368b1d084b0 to d679a4c98193 (3 revisions) (flutter/engine#53961) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
This is only ever used for gen_snapshot_arm64 where the value will only ever be 'clang_x64'. If we were to migrate builds to arm64 hosts, the gen_snapshot_x64 target would be broken as the script stands today. This flag is never passed by recipe infra or outside callers, and can thus be safely inlined. The same refactoring was performed for generating universal gen_snapshots in #53954. A followup patch will update the location where this gen_snapshot binary is generated (and adds an arm64 host binary build), and the merged universal gen_snapshot_${target_cpu} will be written to the root output directory. This is minor pre-factoring to simplify the followup patch, which migrates to universal binaries for iOS. Issue: flutter/flutter#101138 Issue: flutter/flutter#69157
…lutter#151905) flutter/engine@45b722b...39ee1a5 2024-07-17 [email protected] Clean up create_macos_gen_snapshots.py options (flutter/engine#53954) 2024-07-17 [email protected] Roll Skia from def61bdd977a to 4d2047aa3c8d (1 revision) (flutter/engine#53960) 2024-07-17 [email protected] Roll Dart SDK from 7368b1d084b0 to d679a4c98193 (3 revisions) (flutter/engine#53961) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…lutter#151905) flutter/engine@45b722b...39ee1a5 2024-07-17 [email protected] Clean up create_macos_gen_snapshots.py options (flutter/engine#53954) 2024-07-17 [email protected] Roll Skia from def61bdd977a to 4d2047aa3c8d (1 revision) (flutter/engine#53960) 2024-07-17 [email protected] Roll Dart SDK from 7368b1d084b0 to d679a4c98193 (3 revisions) (flutter/engine#53961) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
This patch updates
create_macos_gen_snapshots.pyto take the path to the inputgen_snapshotbinaries rather than just the path to the buildroot, and hardcoding the binary names and buildroot-relative paths internally.This has a couple advantages:
This is a refactoring with no semantic change, therefore no tests have changed.
Background
create_macos_gen_snapshot.pyis used to:Issue: flutter/flutter#151848
This is refactoring to support:
Issue: flutter/flutter#101138
Issue: flutter/flutter#69157
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.