Skip to content
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

[Fuchsia] Use shared gn-sdk from chromium #50855

Merged
merged 41 commits into from Feb 27, 2024

Conversation

zijiehe-google-com
Copy link
Contributor

@zijiehe-google-com zijiehe-google-com commented Feb 22, 2024

Fuchsia team is working on getting rid of non-versioned libraries and sysroot (see b/40935282), but flutter is using a fairly old version of in-house gn-sdk. It's hard to maintain it anymore.
So this change removes the in-house gn-sdk and replaces it with the gn-sdk from chromium.
This is a prerequisite to select the idk / sdk lib version according to the api-level.

This change contains three parts:

  1. Replacing gn-sdk/ with gn-sdk/src/ since the chromium needs a README.chromium in gn-sdk/ folder.
  2. Making the existing build rules work with the newer gn-sdk.
  3. Drive-by replacing "gtest_runner.shard.cml" with "sys/testing/gtest_runner.shard.cml", it's in fuchsia sdk already.

Bug: b/40935282

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

aarongable pushed a commit to chromium/chromium that referenced this pull request Feb 23, 2024
This change imports some missing features from
https://github.com/flutter/engine/tree/main/tools/fuchsia/gn-sdk
so that flutter can use the same gn-sdk rather than maintaining a
different copy.
Note, the gn-sdk in flutter does not support idk version which can be
addressed by flutter/engine#50855 and its
follow-up changes.

Beside the missing features, it also improves the compatibility of
the gn-sdk to
1) allow customized gn_configs.gni instead of a hard-coded location.
2) handle several edge cases, like duplicated 'meta/' or '.cml', and missing folders.

The change itself should be transparent to chromium, newly added
features won't be enabled without explicitly using the relevant
parameters or gn arguments.

Bug: flutter/flutter#140179
Change-Id: I5b27f286de5abd877ce81404759b179a2743b426
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5315612
Reviewed-by: David Song <wintermelons@google.com>
Commit-Queue: Zijie He <zijiehe@google.com>
Cr-Commit-Position: refs/heads/main@{#1264668}
@zijiehe-google-com zijiehe-google-com marked this pull request as ready for review February 24, 2024 15:37
@flutter-dashboard
Copy link

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.

Copy link
Contributor

@jrwang jrwang left a comment

Choose a reason for hiding this comment

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

LGTM

@zijiehe-google-com zijiehe-google-com added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 26, 2024
@zijiehe-google-com zijiehe-google-com removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 27, 2024
@zijiehe-google-com zijiehe-google-com added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 27, 2024
@auto-submit auto-submit bot merged commit 8b24024 into flutter:main Feb 27, 2024
30 checks passed
zanderso added a commit to flutter/flutter that referenced this pull request Feb 28, 2024
5e0d9ba35d Roll Skia from 636e136b0da9 to 1beae57ea0dd (3 revisions)
(flutter/engine#51007)
63b6117514 [skwasm] Clip pictures if they go beyond the bounds of the
window. (flutter/engine#50887)
cd57dc9b4c GLES for scenario_app tests using Impeller
(flutter/engine#51000)
ef4c205239 Roll Skia from d5ca52bc7739 to 636e136b0da9 (8 revisions)
(flutter/engine#51006)
8b240244ef [Fuchsia] Use shared gn-sdk from chromium
(flutter/engine#50855)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App platform-fuchsia
Projects
None yet
2 participants