261 Commits

Author SHA1 Message Date
Jason Simmons
09e12e0f51 Reland "Replace use of Fontmgr::RefDefault with explicit creation calls" (flutter/engine#48764)
Relands https://github.com/flutter/engine/pull/48571 with a patch that uses the directory-based SkFontMgr as a default font manager on Linux
2023-12-07 15:45:08 +00:00
Jason Simmons
6f48ab3443 Revert "Replace use of Fontmgr::RefDefault with explicit creation calls" (flutter/engine#48755)
This reverts commit d5d8b5de90f40644f23d309c0f68d03e299334eb.

The flutter/tests/skp_generator test (running in flutter_tester on
Linux) was failing, along with some customer tests.
2023-12-06 17:50:14 -08:00
Kevin Lubick
d5d8b5de90 Replace use of Fontmgr::RefDefault with explicit creation calls (flutter/engine#48571)
In https://g-issues.skia.org/issues/305780908 Skia is removing the
default SkFontMgr. Previous work consolidated all references to
txt/platform.h and this replaces those last references. I attempted to
mirror the existing functionality, which still responds to GN flags and
the target platform.

After this PR, Flutter should not be depending on the default fontmgr
(and the defines in flutter_defines.gni) will maintain that behavior
until the legacy functions/methods are deleted from Skia. There were a
few tests that I missed on an earlier PR which relied on the default
font (helper added in #47493). These tests were failing because they
were making some assertions related to TextBlobs, which didn't work if
the (now-empty) Typeface they loaded had no glyphs. Thus, I added a few
extra asserts to make sure these textblobs *had* glyphs which make the
failing tests less mysterious, should this issue crop up again.

I cleaned up Flutter's BUILD.gn file for Skia a bit, deleting unused
targets related to the font managers. This involved fixing an implicit
dependency from //third_party/glfw/ to `Gdi32.lib` on Windows.

## 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] and the [C++,
Objective-C, Java style guides].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] 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 `///`).
- [x] I signed the [CLA].
- [x] All existing and new tests are passing.

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

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[C++, Objective-C, Java style guides]:
https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
[testing the engine]:
https://github.com/flutter/flutter/wiki/Testing-the-engine
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2023-12-06 13:02:34 -05:00
Matan Lurey
6e99e081fe Roll a new version of googletest (2021->2023). (flutter/engine#48285) 2023-11-30 17:50:30 -08:00
gaaclarke
e80ecd9194 [Impeller] Switched to static linked libc++ in vulkan validation layers. (flutter/engine#48290)
fixes https://github.com/flutter/flutter/issues/138535
test coverage: existing integration tests in flutter repo which look for validation layers

I also verified locally that the `libc++.so` is no longer present and that it runs correctly.

```
$ find lib/arm64-v8a/
lib/arm64-v8a/
lib/arm64-v8a//libflutter.so
lib/arm64-v8a//libVkLayer_khronos_validation.so
```

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-11-21 22:06:05 +00:00
Zachary Anderson
aa3f8e61c1 Moves expat, ocmock, libjpeg-turbo, libwebp, and wuffs to //flutter/third_party (flutter/engine#48193)
As part of eliminating the Flutter buildroot
(https://github.com/flutter/flutter/issues/67373), we are moving all
third-party dependencies from //third_party to //flutter/third_party.

Once all third-party dependencies have been migrated, tooling and config
will be moved and the buildroot will be eliminated altogether.

No tests changed because there is no semantic change to this PR. This is
simply relocating a dependency.

This PR moves expat, ocmock, libjpeg-turbo, libwebp, and wuffs to
//flutter/third_party.

It also deletes //third_party/fontconfig, which was unused.
2023-11-19 22:53:29 -08:00
Jason Simmons
1bcbdfe24e Add a libcxxabi module that provides support for C++ thread-local storage (flutter/engine#47886)
See https://github.com/flutter/flutter/issues/138117
2023-11-13 18:50:05 +00:00
Jackson Gardner
9549a0fbe2 Bundle flutter.js via esbuild (flutter/engine#47573)
* Roll esbuild as a CIPD package along with the browser roller. I renamed `browser_lock`/`browser_roller` etc to `package_lock` and `package_roller` since it will handle more than just browsers now.
* Download the esbuild CIPD package via DEPS.
* Have a build rule for running esbuild on some JavaScript or TypeScript
* Bundle and minify `flutter.js` using esbuild.
* Include in `flutter_web_sdk` the original `flutter.js` source, the minified `flutter.js`, and a sourcemap file to map between thnm.
* Also slightly changed the structure to put the `flutter.js` stuff in `flutter_web_sdk/flutter_js` instead of just at the root level of `flutter_web_sdk`. This should be fine because I haven't merged the change that has the flutter tool consume this yet.
2023-11-03 20:24:29 +00:00
Zachary Anderson
8f629f2ee0 Move //third_party/benchmark to //flutter/third_party/benchmark (flutter/engine#47652)
As part of eliminating the Flutter buildroot
(https://github.com/flutter/flutter/issues/67373), we are moving all
third-party dependencies from //third_party to //flutter/third_party.

Once all third-party dependencies have been migrated, tooling and config
will be moved and the buildroot will be eliminated altogether.

No tests changed because there is no semantic change to this PR. This is
simply relocating a dependency.
2023-11-03 10:59:49 -07:00
Chinmay Garde
cd82ec8461 Migrate inja, sqlite, libtess2 to //flutter/third_party. (flutter/engine#47408)
Part of https://github.com/flutter/flutter/issues/67373
2023-10-30 16:00:38 +00:00
Zachary Anderson
59cc39e9bd Move flatbuffers to flutter/third_party (flutter/engine#47387)
As part of eliminating the Flutter buildroot
(https://github.com/flutter/flutter/issues/67373), we are moving all
third-party dependencies from //third_party to //flutter/third_party.

Once all third-party dependencies have been migrated, tooling and config
will be moved and the buildroot will be eliminated altogether.

No tests changed because there is no semantic change to this PR. This is
simply relocating a dependency.
2023-10-27 13:05:56 -07:00
Zachary Anderson
bcfec4bcfc Move shaderc to flutter/third_party (flutter/engine#47383)
As part of eliminating the Flutter buildroot
(https://github.com/flutter/flutter/issues/67373), we are moving all
third-party dependencies from //third_party to //flutter/third_party.

Once all third-party dependencies have been migrated, tooling and config
will be moved and the buildroot will be eliminated altogether.

No tests changed because there is no semantic change to this PR. This is
simply relocating a dependency.
2023-10-27 10:45:20 -07:00
Zachary Anderson
70ba5c45fb Reland: Remove the frontend server wrapper (flutter/engine#47010)
Relands https://github.com/flutter/engine/pull/46440 with https://github.com/flutter/engine/pull/46842
2023-10-18 20:32:37 +00:00
Chris Bracken
401ce5f32e Move imgui from buildroot to flutter third_party (flutter/engine#47031)
As part of eliminating the Flutter buildroot (#67373), we are moving all
third-party dependencies from //third_party to //flutter/third_party.

Once all third-party dependencies have been migrated, tooling and config
will be moved and the buildroot will be eliminated altogether.

Issue: https://github.com/flutter/flutter/issues/136284

No tests changed because there is no semantic change to this PR. This is
simply relocating a dependency.

## 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] and the [C++,
Objective-C, Java style guides].
- [X] 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.
- [X] I updated/added relevant documentation (doc comments with `///`).
- [X] I signed the [CLA].
- [X] All existing and new tests are passing.

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

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[C++, Objective-C, Java style guides]:
https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
[testing the engine]:
https://github.com/flutter/flutter/wiki/Testing-the-engine
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2023-10-17 16:06:26 -07:00
Chinmay Garde
cd22beb767 Move the secondary build tree into the engine. (flutter/engine#46989)
Now, both the DEPS and the custom GN rules for them are in the same repo and won't need a buildroot sibling patch + roll.

Part of https://github.com/flutter/flutter/issues/67373. Pending landing of the buildroot patch in https://github.com/flutter/buildroot/pull/781 (the DEPS will be updated before landing and after the presubs pass).
2023-10-17 17:14:57 +00:00
Zachary Anderson
7922a335e8 Don't use objcopy to embed Android icudtl (flutter/engine#46862)
When objcopy is used to embed data into a linkable object file, that
object file will only have default bits set in its header for ABI etc..
If the linker doesn't cooperate by ignoring ABI mismatches on object
files without code, then linking will fail. This PR stops using objcopy
to create an object file that embeds icudtl.dat into the Android
embedder, and instead uses the `bin_to_assembly.py` script that we're
already using for Dart VM snapshot data.

Context in https://github.com/llvm/llvm-project/issues/68915
2023-10-13 07:33:24 -07:00
Zachary Anderson
35f53fe500 Revert "Remove the frontend server wrapper" (flutter/engine#46863)
Reverts flutter/engine#46440

For b/305121780
2023-10-12 20:42:35 -07:00
Zachary Anderson
23b6f6116f Remove the frontend server wrapper (flutter/engine#46440)
Instead, this PR copies the frontend server from the Dart SDK (whether prebuilt or not) into the location expected by internal engine tests and artifact construction. This PR also consolidates the three GN templates that invoked the frontend server down to one.

Framework presubs: https://github.com/flutter/flutter/pull/135836

Related: https://github.com/flutter/flutter/issues/60007
2023-10-12 15:40:50 +00:00
Dan Field
c1314cc717 Embed a license readme in every zip archive (flutter/engine#43974)
fixes https://github.com/flutter/flutter/issues/130682

This patch makes all zip files created via the zip_bundle rule have an embedded LICENSE that points to a permalink to the LICENSE for that SDK commit hash. Previously we only did this for a few tools, but it was pointed out that some of the zip files we generate that are meant for consumption in the tool are otherwise missing a stand-alone license file (the tool downloads the full license file separately from the individual zips, as it would be costly to include it with each and every one).
2023-07-27 03:56:09 +00:00
godofredoc
e11ed85b7a Use target platform name when generating artifacts. (flutter/engine#40519)
Use target platform name when generating artifacts.
2023-03-23 20:58:57 +00:00
Zachary Anderson
c5363b0e21 Write entitlements for wasm-opt (flutter/engine#40349) 2023-03-16 09:24:38 -07:00
Jackson Gardner
fd6958d467 Remove unused gn target. (flutter/engine#40149)
Remove unused gn target.
2023-03-08 22:13:47 +00:00
Xilai Zhang
97d8b0a936 [gn + codesign] add metadata for path ops (flutter/engine#39698)
[gn + codesign] add metadata for path ops
2023-02-28 00:14:15 +00:00
Xilai Zhang
4bf5a04e84 [gn + codesign] move snapshot meta data to generators (flutter/engine#39726)
[gn + codesign] move snapshot meta data to generators
2023-02-28 00:06:43 +00:00
godofredoc
9dff1d9871 Add gen_snapshot to windows flutter artifact. (flutter/engine#39353)
* Add gen_snapshot to windows flutter artifact.

This file was missing on release and profile versions.

Bug: https://github.com/flutter/flutter/issues/119887

* Format gn file.
2023-02-03 17:13:13 +00:00
godofredoc
bc8e6f0aab Add missing file to artifacts.zip and win platform. (flutter/engine#39310)
dll.exp, dll.lib and dll.pdb files are missing from the gn generated
artifacts.zip.

Bug: https://github.com/flutter/flutter/issues/119663
2023-02-02 05:02:00 +00:00
Pierrick Bouvier
3811a350df Add CI builder for windows-arm64. (#38394) (flutter/engine#38739)
* Generate zip archives for Windows following target platform.

* Add CI builder for windows-arm64.

All packages can be cross compiled from an x64 machine.
Unittests are disabled, as they require an arm64 machine.

* Add windows-arm64 to CI.
2023-01-11 23:01:08 +00:00
Loïc Sharma
5e35f2ab74 Revert "Add CI builder for windows-arm64. (#38394)" (flutter/engine#38729)
This reverts commit 35810a873b59c8d738f1f3661854572cc3aa2215.
2023-01-09 22:35:13 +00:00
Pierrick Bouvier
35810a873b Add CI builder for windows-arm64. (flutter/engine#38394)
* Generate zip archives for Windows following target platform.

* Add CI builder for windows-arm64.

All packages can be cross compiled from an x64 machine.
Unittests are disabled, as they require an arm64 machine.

* Add windows-arm64 to CI.
2023-01-09 21:51:12 +00:00
godofredoc
2e8d995cb6 Archive windows gen_snapshot.exe. (flutter/engine#35414)
* Archive windows gen_snapshot.exe.

This is required to enable engine_v2 recipes for windows platform.

Bug: https://github.com/flutter/flutter/issues/81855

* Add dep to generate gen_snapshot.exe.

* Use target platform name rather than host.

* Use prebuilt_arch.

* Use platform_name instead of is_win.

* Remove android check.

* Fix output name.

* Separate platform and cpu in name.

* Remove failing line.

* Use dart_target_arch rather than target_cpu in windows.

* Add dart_target_arch to scope.

* Add support for android_cpu.

* Fix android_cpu variable name.

* Rebase to ToT

* Try to use target cpu directly.

* Use host os instead of is_win.

* Build engine artifacts for win.

* Update build/archives/BUILD.gn

Co-authored-by: Zachary Anderson <zanderso@users.noreply.github.com>

* Update build/archives/BUILD.gn

Co-authored-by: Zachary Anderson <zanderso@users.noreply.github.com>

* Update build/archives/BUILD.gn

Co-authored-by: Zachary Anderson <zanderso@users.noreply.github.com>

Co-authored-by: Zachary Anderson <zanderso@users.noreply.github.com>
2022-11-14 22:54:53 +00:00
Brandon DeRosier
24174f255f Add the Impeller shader lib to the engine archive (flutter/engine#37218) 2022-11-01 14:19:13 -07:00
Jackson Gardner
adeb11927b Keep the fuchsia build from trying to build the dart sdk (flutter/engine#36973) 2022-10-24 19:42:19 +00:00
Jackson Gardner
c7d1a69158 Web sdk build reland (flutter/engine#36851) 2022-10-20 20:31:54 +00:00
Jackson Gardner
cf2bf1ba1b Revert "Build Web SDK in wasm build tree (#36520)" (flutter/engine#36805) 2022-10-17 18:40:05 +00:00
Jackson Gardner
48495d1865 Build Web SDK in wasm build tree (flutter/engine#36520) 2022-10-14 18:40:49 +00:00
Jenn Magder
058fd02953 Stop compiling iOS with bitcode (flutter/engine#36596) 2022-10-04 21:56:13 +00:00
godofredoc
0f46ddf8ba Add gen_snapshot only for non debug versions of artifacts. (flutter/engine#36358) 2022-09-26 20:57:55 +00:00
godofredoc
3e7c81d01d Include flutter_tester only on debug files. (flutter/engine#36296) 2022-09-21 20:01:03 +00:00
godofredoc
0873841f1a Bundle impeller only on debug version of artifacts. (flutter/engine#36225) 2022-09-17 01:33:04 +00:00
godofredoc
45383f1b97 Write link content rather than source path (flutter/engine#35577) 2022-08-22 15:16:46 +00:00
godofredoc
be9ba9f07f MacOS framework was simplified to remove an internal zip. (flutter/engine#35563) 2022-08-20 05:30:19 +00:00
Xilai Zhang
e8385b7d63 [gn] mac entitlement config when dart sdk is non prebuilt (flutter/engine#35016) 2022-08-04 21:38:05 +00:00
Loïc Sharma
64c83cfc87 Revert "Use git exec candidate list on all platforms for build" (flutter/engine#34844) 2022-07-22 17:45:04 +00:00
William Hesse
f8f07f4f60 [infra] Support archiving the built Dart SDK in the non-prebuilt case (flutter/engine#34605)
[infra] Support archiving the built Dart SDK in the non-prebuilt case

Bug: https://github.com/flutter/flutter/issues/106494
2022-07-19 19:02:55 +02:00
Xilai Zhang
060ecf6119 [gn + artifacts] dart-sdk mac entitlement configs (flutter/engine#34679) 2022-07-18 18:00:05 +00:00
Xilai Zhang
480b8230aa [gn + artifacts] embed Mac entitlement config in gen_snapshot.zip (flutter/engine#34702) 2022-07-18 17:56:07 +00:00
Márk Tolmács
e517dd9b9b Use git exec candidate list on all platforms for build (flutter/engine#34294)
* Use git exec candidate list on all platforms for build

build/git_revision.py now uses a git executable name search list on all
platforms, avoiding issues with some Windows installations.

* Moving python import to top to satisfy linter

* Fixing format error and removing unneeded check

* Adding git candidate search to githooks setup.py

* Adding missing COM initialization to
flutter_tester executable on Windows

* Revert "Adding missing COM initialization to"

Reason: Added to incorrect branch

This reverts commit 1b0da56ffd9af41d457f5a609022d4b0387cd935.

* Format fix for setup.py
2022-06-28 09:30:46 -07:00
Xilai Zhang
9bbaf6212e [gn] use generated_files to encode entitlement information (flutter/engine#34216)
* generated_files

* for debugging push

* format files

* formate files

* trigger build

* add deps
2022-06-27 09:09:29 -07:00
Jonah Williams
a184d04005 cleanup fractional translation ifdefs and config (flutter/engine#34198) 2022-06-22 09:00:57 -07:00
godofredoc
a00479bb95 Add slash to separate directories. (flutter/engine#34147)
The zip file was not including the directory name because it was missing
an slash.

Bug: https://github.com/flutter/flutter/issues/81855
2022-06-17 16:48:19 -07:00