8000 Exclude arm64 from valid iOS simulators by jmagman · Pull Request #73828 · flutter/flutter · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Exclude arm64 from valid iOS simulators #73828

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in t 8000 o your account

Merged
merged 1 commit into from
Mar 4, 2021
Merged

Conversation

jmagman
Copy link
Member
@jmagman jmagman commented Jan 13, 2021

Another attempt at #73458 on top of minimum Xcode 12 version bump.

Description

Exclude unsupported new arm64 and old i386 iOS simulators at the build setting layer. This will allow the excluded architectures to be excluded when the project is run from Xcode, instead of just from the flutter command line.

Do this for plugin targets (in the podhelper) as well as in the Runner app target (Generated.xcconfig).

Update the add-to-app host apps to exclude arm64 simulators since Flutter still doesn't contain that slice.
Sample code update: flutter/samples#646
Website docs update: flutter/website#5174

#64502 (comment)

Added a ios_content_validation_test case to target the simulator with ONLY_ACTIVE_ARCH=NO which will target all valid architectures that have not been explicitly excluded. This test case would fail if arm64 or i386 were not excluded.

@flutter-dashboard flutter-dashboard bot added team Infra upgrades, team productivity, code health, technical debt. See also team: labels. tool Affects the "flutter" command-line tool. See also t: labels. labels Jan 13, 2021
@google-cla google-cla bot added the cla: yes label Jan 13, 2021
@jmagman jmagman force-pushed the arm-arch branch 2 times, most recently from 25831f6 to 88b903e Compare March 3, 2021 22:26
@jmagman jmagman marked this pull request as ready for review March 3, 2021 22:26
'objc',
'hello',
], workingDirectory: tempDir.path);
group('iOS app validation', () {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of this file is whitespace changes.

timeout: const Timeout(Duration(minutes: 5)),
);
}
testWithoutContext('build for simulator with all available architectures', () {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is new.

@jmagman
Copy link
Member Author
jmagman commented Mar 4, 2021

Third time's the charm (maybe)!

@jonahwilliams
Copy link
Member

Can you remind me what the failure was last time? Xcode version issues?

@jmagman
Copy link
Member Author
jmagman commented Mar 4, 2021

Can you remind me what the failure was last time? Xcode version issues?

#73807 (comment)

Xcode 11 had an allow list VALID_ARCHS build setting which I had used before ARM was a thing to indicate that plugins shouldn't build for the 32-bit i386 simulator.
https://github.com/flutter/plugins/blob/bc2514ebd824adb1c85709e53bc57235af7b5212/packages/device_info/device_info/ios/device_info.podspec#L21

s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }

Xcode 12 has a new EXCLUDED_ARCHS build setting which is the deny list version of VALID_ARCHS, which the plugin template now uses instead #64504. But there are plenty of plugins that use the older style VALID_ARCHS plugin template.

When both were present, Xcode 11 had a little freak out, which was the cause for the last two reverts (this took me hours to figure out).

stdout:     warning: There are no architectures to compile for because all architectures in VALID_ARCHS (x86_64) are also in EXCLUDED_ARCHS (x86_64, i386). (in target 'device_info' from project 'Pods')

That error doesn't even make sense--the EXCLUDED_ARCHS build setting in this PR doesn't contain x86_64.

But now the devicelab is on Xcode 12 and it's the minimum version the tool allows for developers. Xcode 12 handles these build settings, so with this PR even when plugins have VALID_ARCHS set, it prefers EXCLUDED_ARCHS and excludes arm64 and i386. Once the Flutter.framework ships with an arm64 simulator, we can remove arm64 from that list.

Copy link
Member
@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform-host-arm Building on an ARM-based platform team Infra upgrades, team productivity, code health, technical debt. See also team: labels. tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0