-
Notifications
You must be signed in to change notification settings - Fork 29.8k
disable metal for crosscompile from mac to linux #176639
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 to your account
disable metal for crosscompile from mac to linux #176639
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. 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. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
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.
Code Review
This pull request correctly disables Metal support when cross-compiling from macOS to Linux by updating the condition in the gn build script. This prevents build failures. I have one minor suggestion to align with Python best practices.
| gn_args['skia_use_gl'] = args.target_os != 'fuchsia' | ||
|
|
||
| if sys.platform == 'darwin' and args.target_os not in ['android', 'fuchsia']: | ||
| if sys.platform == 'darwin' and args.target_os not in ['android', 'fuchsia', 'linux']: |
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.
For better adherence to Python best practices and the Google Python Style Guide, it's recommended to use a tuple for a fixed collection of items instead of a list. Tuples are immutable and are generally preferred for sequences that are not expected to change.1
| if sys.platform == 'darwin' and args.target_os not in ['android', 'fuchsia', 'linux']: | |
| if sys.platform == 'darwin' and args.target_os not in ('android', 'fuchsia', 'linux'): |
Style Guide References
Footnotes
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.
I opted to not diverge from the existing conventions in the source file. I can update if required.
b0a7259 to
60a02b7
Compare
chinmaygarde
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.
Perhaps this check should be an allow-list for darwin-macos and darwin-ios instead of a deny-list.
|
autosubmit label was removed for flutter/flutter/176639, because The base commit of the PR is older than 7 days and can not be merged. Please merge the latest changes from the main into this branch and resubmit the PR. |
60a02b7 to
5c40285
Compare
flutter/flutter@4c91098...7cf0dc1 2025-10-28 engine-flutter-autoroll@skia.org Roll Skia from 602bbd4af8f9 to e4d3d8f31aef (4 revisions) (flutter/flutter#177647) 2025-10-28 huy@nevercode.io Fix AppBar Semantics namesRoute for mismatched platforms (flutter/flutter#176694) 2025-10-28 huy@nevercode.io Fix Popup menu Semantics label for mismatched platforms (flutter/flutter#177049) 2025-10-28 engine-flutter-autoroll@skia.org Roll Skia from 8b2d056701df to 602bbd4af8f9 (1 revision) (flutter/flutter#177628) 2025-10-28 engine-flutter-autoroll@skia.org Roll Skia from 5723f87f8530 to 8b2d056701df (3 revisions) (flutter/flutter#177626) 2025-10-27 engine-flutter-autoroll@skia.org Roll Skia from 170c11f1ddc5 to 5723f87f8530 (6 revisions) (flutter/flutter#177618) 2025-10-27 huy@nevercode.io Enhance DropdownMenuEntry's labelWidget docs (flutter/flutter#177160) 2025-10-27 jesswon@google.com Regenerated lockfiles for New Template Values (flutter/flutter#177617) 2025-10-27 victorsanniay@gmail.com Correct editable text and placeholder position in baseline aligned stack (flutter/flutter#177342) 2025-10-27 49699333+dependabot[bot]@users.noreply.github.com Bump actions/upload-artifact from 4 to 5 in the all-github-actions group (flutter/flutter#177620) 2025-10-27 planetmarshall@users.noreply.github.com add gn flag to optimize builds for size (flutter/flutter#176835) 2025-10-27 planetmarshall@users.noreply.github.com disable metal for crosscompile from mac to linux (flutter/flutter#176639) 2025-10-27 goderbauer@google.com [DDM] enable host builds in the merge queue (flutter/flutter#177446) 2025-10-27 planetmarshall@users.noreply.github.com Disable vulkan X11 support when building for minimal linux (flutter/flutter#176697) 2025-10-27 engine-flutter-autoroll@skia.org Roll Skia from 77348c40d101 to 170c11f1ddc5 (6 revisions) (flutter/flutter#177602) 2025-10-27 jason-simmons@users.noreply.github.com Set the font weight variation axis based on the text style's FontWeight (flutter/flutter#175771) 2025-10-27 30870216+gaaclarke@users.noreply.github.com Fixed `RuntimeEffect` with `ImageFilter.compose` (flutter/flutter#177510) 2025-10-27 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Clean before building when framework headers change (#177512)" (flutter/flutter#177610) 2025-10-27 kjlubick@users.noreply.github.com [skia] Disable legacy png encoding/decoding in skp (flutter/flutter#177462) 2025-10-27 15619084+vashworth@users.noreply.github.com Clean before building when framework headers change (flutter/flutter#177512) 2025-10-27 jason-simmons@users.noreply.github.com Roll dartdoc to 9.0.0 (flutter/flutter#177590) 2025-10-27 116356835+AbdeMohlbi@users.noreply.github.com Fix typo in comment about `manifestFile` in `DeepLinkJsonFromManifestTaskHelper.kt` (flutter/flutter#177538) 2025-10-27 dkwingsmt@users.noreply.github.com Fix RoundedSuperellipse crashes for tiny corners (flutter/flutter#177070) 2025-10-27 engine-flutter-autoroll@skia.org Roll Packages from 53d6138 to bbf96a0 (7 revisions) (flutter/flutter#177588) 2025-10-27 github@alexv525.com Fix missing list indicators in CHANGELOG.md (flutter/flutter#177484) 2025-10-27 bkonyi@google.com [ Tool ] Add `Stream.transformWithCallSite` to provide more useful stack traces (flutter/flutter#177470) 2025-10-27 engine-flutter-autoroll@skia.org Roll Skia from 06243224ecf0 to 77348c40d101 (1 revision) (flutter/flutter#177585) 2025-10-27 15619084+vashworth@users.noreply.github.com Add guided error for precompiled cache error (flutter/flutter#177327) 2025-10-27 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from tKrvmvTOQITL81oOC... to ir6J2isKAYa1jNLyJ... (flutter/flutter#177578) 2025-10-27 engine-flutter-autoroll@skia.org Roll Skia from 784ed1787bd6 to 06243224ecf0 (1 revision) (flutter/flutter#177575) 2025-10-27 engine-flutter-autoroll@skia.org Roll Skia from de52b3a7585a to 784ed1787bd6 (5 revisions) (flutter/flutter#177571) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC bmparr@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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
<!-- Thanks for filing a pull request! Reviewers are typically assigned within a week of filing a request. To learn more about code review, see our documentation on Tree Hygiene: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md --> Disable metal support when cross compiling from mac to linux targets, othewise build script generation fails. Closes #176637 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
<!-- Thanks for filing a pull request! Reviewers are typically assigned within a week of filing a request. To learn more about code review, see our documentation on Tree Hygiene: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md --> Disable metal support when cross compiling from mac to linux targets, othewise build script generation fails. Closes flutter#176637 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
Disable metal support when cross compiling from mac to linux targets, othewise build script generation fails.
Closes #176637
Pre-launch Checklist