Fix Xcode prepare's logic to assume iOS target architecture#154585
Closed
loic-sharma wants to merge 4 commits into
Closed
Fix Xcode prepare's logic to assume iOS target architecture#154585loic-sharma wants to merge 4 commits into
loic-sharma wants to merge 4 commits into
Conversation
56082e7 to
73d4767
Compare
73d4767 to
8182a2d
Compare
48828df to
b1b862c
Compare
b1b862c to
4b90e9b
Compare
4b90e9b to
1eecaf0
Compare
Member
Author
|
After further research, I found that the optimization is correct if build settings follow Apple's documentation. However, |
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.
Problem
Enabling the Swift Package Manager feature caused post-submit tests to fail on Mac x64 hosts:
Example error...
https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_ios%20rrect_blur_perf_ios__timeline_summary/575/overview
Background
As part of the Swift Package Manager project, an Xcode Scheme Pre-Action was added to unpack the Flutter framework. This ensures the Flutter framework is available before Swift Package Manager builds packages.
#150052 improved the performance of builds using Swift Package Manager:
However,
NATIVE_ARCHis the architecture of the host machine, not the target machine. As a result, Mac x86_64 hosts attempted to unpack the Flutter iOS framework using the x86_64 architecture when it is Arm64 only.Solution
This updates the Xcode Pre-Action's logic: instead of using the host machine's architecture, it uses the build's
SDKROOT. If the SDK root isn't a simulator, the pre-action assumes an Arm64 target build.This change also adds a new
ios_prepare_pre_action_testtest project. This allows us to test the Xcode Scheme Pre-Action even if the Swift Package Manager feature is disabled.Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.