156 Commits

Author SHA1 Message Date
Rich Kadel
359fac8308 Re-enable dart runner AOT builds (flutter/engine#31844)
Fixed: fxbug.dev/64153

Note that I also removed the TODO for fxbug.dev/86941. After talking
with the bug author, this file is not directly relevant to that bug.
2022-03-11 14:07:56 -08:00
David Worsham
e743ccaac4 fuchsia: Fix potential SDK errors (flutter/engine#31099) 2022-01-26 18:58:26 -08:00
Chase Latta
7f8b7f0b41 Remove version flag from pm_tool.gni (flutter/engine#31069)
This flag is deprecated and no longer used.
2022-01-25 17:04:13 -08:00
Alexander Biggs
e12159a59f [fuchsia] Document and simplify fuchsia_archive. (flutter/engine#30854)
This might not be necessary since we ultimately want to
get rid of these rules in favor of using the SDK, but it's
useful to me for reference during embedder prototyping.

I got rid of some arguments that seemed dead:

- `cml_file` in `_fuchsia_archive` didn't seem used anywhere. It is
  used in `fuchsia_archive`.
- `meta_dir` didn't seem used.
2022-01-14 18:34:02 -08:00
Chase Latta
3578ec3d99 [fuchsia] stamp package with target api level (flutter/engine#30857)
Infrastructure runs the pm command on packages in a different path
which we were not accounting for. This will make sure we stamp the
packages when infra builds them.
2022-01-14 09:32:00 -08:00
Chase Latta
0f99fadcf2 Allow additional expose_dirs in flutter_runner (flutter/engine#30749)
Users can add an expose_dirs entry to the program field in a
component's cml file to optionally expose extra directories
from their out/ directory.

BUG: fxbug.dev/89690
2022-01-10 10:44:21 -08:00
Chase Latta
1324bac660 Stamp fuchsia packages with api level (flutter/engine#29998)
BUG: https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=87813

As part of the fuchsia platform versioning we are stamping all of
our packages with a target api level which can be read by our assembly
tools. We would like to be able to update the target api level with a
roller so I added a file which can is read by the gn tool. I am open
to suggestions about how to change this is we do not want to add
file read calls to our gn script.
2021-11-30 11:40:44 -08:00
Chase Latta
9b0b1365a2 Add ability to stamp fuchsia packages with API level (flutter/engine#29851) 2021-11-22 17:43:02 -08:00
Chase Latta
5dcf803aa6 Manually roll fuchsia SDK to Qv7WqmG8hOpj9NV5Ng6rBDSQW7KeowbX0kpbW0FaZgIC (flutter/engine#29453) 2021-11-01 20:43:01 -07:00
David Worsham
4c9cf9869a fuchsia: Enable ASAN; add tests flag (flutter/engine#29414)
* Get ASAN working

* Remove zircon_ffi from build

* Add enable-unittests gn flag
2021-10-29 15:10:29 -07:00
Ahmed Ashour
acdc8a5c8b Fix typos (flutter/engine#29280) 2021-10-27 20:30:31 -07:00
godofredoc
ae68d0409b Update documentation links to point to main branch. (flutter/engine#29326) 2021-10-26 10:48:02 -07:00
Rich Kadel
22f6d50d25 Adding missing snapshot to the fuchsia package in AOT builds (flutter/engine#29268)
The initial implementation tried to leverage the fuchsia.git approach to
adding resources via GN template, but the GN SDK does not use the same
format or approach. This PR adds the snapshot resource in the way the
GN SDK expects.
2021-10-20 19:20:37 -07:00
Rich Kadel
b4e2f34518 Improving support for AOT builds of Fuchsia packages
The integration test works in debug/jit mode only, and building in
`profile` and `release` modes was not working, breaking some builders.

The workaround was to disable the test.

This PR will enable release/aot mode so it will build, and unblock both
the debug-mode version of the test (tested by CI) and release mode
builds of the repo.

Due to the request to unblock, this PR does not yet build packages in
`profile` mode that will run in Fuchsia, but it should at least build
without errors. Ongoing work is in progress to also support running in
release mode.
2021-10-19 17:06:29 -07:00
Rich Kadel
c2ad820db9 Migrated integration_flutter_test/embedder (scenic integration test) from fuchsia.git (flutter/engine#26880) 2021-09-30 17:10:02 -07:00
Alexander Biggs
12053d00ea [fuchsia] Small shell scripts for workflow. (flutter/engine#28823) 2021-09-27 17:53:02 -07:00
Alexander Biggs
43d01afb55 [fuchsia] Replace amberctl in serve.sh with pkgctl (flutter/engine#28660)
Fixes: fxb/89785
2021-09-16 09:20:43 -07:00
Alexander Biggs
66fe4ff7d1 [fuchsia] Create DartComponentController for CFv2. (flutter/engine#28613)
Bug: fxb/79871

The code is still using the CFv1 implementation, so this should not affect the existing behavior.

For this version of the PR, I forked the existing DartComponentController. There were a few reasons for this:

Reduces the chance of the change breaking existing tests during Fuchsia GI.
Makes the V2 version of the DartComponentController simpler to read.
Makes it easier to switch over to using the V2 version of the DartComponentController once the migration is ready to happen (less cleanup).
The rate of changes to the DartComponentController is slow so there shouldn't be much maintenance required for the fork.
Changes to the DartRunner itself will happen in a follow-up PR - this PR only verifies that the ComponentController builds.

Relands GN and C++ changes for #27226 after rollback in #28036.
2021-09-14 16:15:53 -07:00
Rich Kadel
dd51e241e5 Fix building Dart Fuchsia components and packages (flutter/engine#28413) 2021-09-09 14:47:02 -07:00
Alexander Biggs
ef0d8bf6fe [fuchsia] Add CML files for dart_runner on CFv2. (flutter/engine#28491)
Bug: 79871

Partial re-land of #27226 (which was reverted in #28036 due to a flaky test). Only adds in the CML files for a CFv2 dart_runner without the corresponding C++ and GN changes.
2021-09-08 11:55:03 -07:00
Chris Bracken
8f87951759 Revert "Build dart:zircon and dart:zircon_ffi (#28071)" (flutter/engine#28313)
This reverts commit 1e9b7aed566105eec982ca0eb545139b218bc916.

Reverting in order to land revert of the gn script_executable from
python3 to vpython3, which is causing flakes on Windows.

Issue: https://github.com/flutter/flutter/issues/88719
2021-08-26 11:21:49 -07:00
Rich Kadel
f88ab69db4 Remove unused python_binary build artifacts (flutter/engine#28111) 2021-08-16 12:52:02 -07:00
Kaushik Iska
1e9b7aed56 Build dart:zircon and dart:zircon_ffi (flutter/engine#28071) 2021-08-16 11:17:02 -07:00
Rich Kadel
51a5b01bad GN build rules for tests using Fuchsia SDK Dart libraries and bindings (flutter/engine#27996) 2021-08-13 08:52:01 -07:00
David Worsham
fb64905b15 Revert '[fuchsia] Make dart_runner work with cfv2' (flutter/engine#28036) 2021-08-12 09:22:22 -07:00
Chris Bracken
8803824c64 Migrate all Python hashbangs to Python 3 (flutter/engine#27838)
Migrates all `#!/usr/bin/env python` hashbang lines to use python3.

Also updates the licence tool to treat python3 scripts on par with
python 2 scripts.

Issue: https://github.com/flutter/flutter/issues/83043
2021-07-31 11:09:12 -07:00
David Worsham
934eced2e4 fuchsia: Add hermetic SessionConnection tests; rename (flutter/engine#27327) 2021-07-20 13:52:09 -07:00
Darren Chan
cbcbbf7102 Migrate non-scenic-based fuchsia tests to cfv2. (flutter/engine#27241)
This PR also wraps up the soft transition for #27417.

Because some unit tests depend on the real Scenic which isn't hermetic, `flutter_runner_tests` and `flutter_runner_scenic_tests` aren't currently compatible with cfv2.
This will change once a FakeScenic is created (https://fxbug.dev/79873).

See https://fxbug.dev/79691.
2021-07-16 23:41:41 -04:00
Kaushik Iska
45cf4e9ab1 [fuchsia] Use FFI to get System clockMonotonic (flutter/engine#27353) 2021-07-14 11:01:58 -07:00
Chase Latta
d7a4148d62 [fuchsia] make dart_runner work with cfv2 (flutter/engine#27226)
Adds support for running the dart runner as a CFv2 component.
The runner has been refactored to launch in both a v1 environemnt
as well as a v2 environment.
2021-07-08 15:19:21 -07:00
Darren Chan
cc3f93e26d Prepare for cfv2 unittests. (flutter/engine#27036) 2021-07-01 13:11:01 -07:00
Chase Latta
38cc5181d8 Allow fuchsia_archive to accept a cml file and cmx file (flutter/engine#27012)
This adds support for adding a cml file to a fuchsia package. The
cml file will be compiled to a cm file and included in the archive.
2021-06-28 13:48:21 -07:00
Dan Field
844fa85973 Fix Fuchsia build on Mac (flutter/engine#27007) 2021-06-28 10:36:01 -07:00
Chase Latta
6c40a784a2 Make fuchsia python scripts work with python3 (flutter/engine#26924) 2021-06-24 12:11:02 -07:00
keyonghan
2b4b08f865 increase verification timeout (flutter/engine#26886) 2021-06-22 15:18:30 -07:00
Darren Chan
6ea64cbb71 [build] Speed up incremental & no-op builds. (flutter/engine#26815)
Per gn documentation, the output timestamp can remain the same if all outputs remain the same, resulting in large time savings since dependent targets don't need to be rebuilt.
See: https://gn.googlesource.com/gn/+/HEAD/docs/reference.md#target-declarations-action_declare-a-target-that-runs-a-script-a-single-time-outputs

Currently, `copy_debug_symbols.py` updates timestamps unconditionally, resulting in slower incremental and no-op builds.
We change its current behavior to not update the timestamps if the debug symbols will not change.

Local testing indicates around a `20s` improvement for no-op and incremental builds:
 - Control: http://go/paste/4800062489100288
 - Experiment: http://go/paste/5727928869453824

See https://fxbug.dev/79001.

CC: @naudzghebre
2021-06-18 19:35:06 -04:00
Darren Chan
5b6518d416 Add debug symbols (symbol-index) to serve.sh for Fuchsia. (flutter/engine#26463) 2021-05-27 16:49:02 -07:00
Darren Chan
24e35adeb4 Canonicalize fuchsia runner debug symbol path. (flutter/engine#26426) 2021-05-27 13:14:01 -07:00
Chase Latta
b563c3aa66 Add script to serve fuchsia packages (flutter/engine#26380) 2021-05-26 15:39:02 -07:00
Darren Chan
a18e76809f Remove build timestamp from build_info.h. (flutter/engine#26403)
Remove build timestamp as it is not updating correctly and it would mark
the build as dirty, triggering a rebuild.

Bug: https://fxbug.dev/73263
2021-05-25 14:43:46 -04:00
Darren Chan
d67fdf5256 Provide the following information to the inspect tree: (flutter/engine#26179) 2021-05-21 11:09:02 -07:00
Chase Latta
84f7a3337b Reland outputs a json version of the package manifest. (flutter/engine#26163)
This patch is in preparation for incremental package serving from the engine repo.

fxbug.dev/76633
Previous attempt to land this patch was failing because I was generating
the package manifest in the package's directory.
2021-05-17 13:21:30 -07:00
Chase Latta
11a976f241 Revert "output fuchsia json package manifest (#26138)" (flutter/engine#26162)
This reverts commit 6d84180a0379ab7eb75645552e5f7e125a2d537d.
2021-05-14 14:43:51 -07:00
Chase Latta
6d84180a03 output fuchsia json package manifest (flutter/engine#26138) 2021-05-14 10:39:03 -07:00
Hunter Freyer
54bc92e051 [build_fuchsia_artifacts] Move license copying into BuildBucket(). (flutter/engine#25815)
Currently, the licenses are copied into the bucket just before
uploading it. Copying the licenses is definitely more about "building"
the bucket than it is about "processing the CIPD package", but
concretely, some tools complain if the license files arent there, and
I'd like to be able to use the cipd tool to upload the bucket
directly.

Co-authored-by: Hunter Freyer <hjfreyer@google.com>
2021-05-07 12:51:02 -07:00
Hunter Freyer
22c452c2ea Fix bug when build_fuchsia_artifacts.py is called without --targets. (flutter/engine#25497)
Example before:

$ ./tools/fuchsia/build_fuchsia_artifacts.py \
    --engine-version HEAD \
    --no-lto \
    --archs x64 \
    --runtime-mode debug

Running gn for variant "fuchsia_debug_x64" with flags: --fuchsia,--fuchsia-cpu,x64,--runtime-mode,debug,--no-lto
Generating GN files in: out/fuchsia_debug_x64
Done. Made 1085 targets from 221 files in 532ms
ninja: Entering directory `/usr/local/google/home/hjfreyer/flutter/engine/src/flutter/tools/fuchsia/../../../out/fuchsia_debug_x64'
ninja: error: empty path
Traceback (most recent call last):
  File "./tools/fuchsia/build_fuchsia_artifacts.py", line 391, in <module>
    sys.exit(main())
  File "./tools/fuchsia/build_fuchsia_artifacts.py", line 380, in main
    args.targets.split(","))
  File "./tools/fuchsia/build_fuchsia_artifacts.py", line 283, in BuildTarget
    BuildNinjaTargets(out_dir, [ 'flutter' ] + additional_targets)
  File "./tools/fuchsia/build_fuchsia_artifacts.py", line 72, in BuildNinjaTargets
    os.path.join(_out_dir, variant_dir)] + targets)
  File "./tools/fuchsia/build_fuchsia_artifacts.py", line 55, in RunExecutable
    subprocess.check_call(command, cwd=_src_root_dir)
  File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja', '-C', '/usr/local/google/home/hjfreyer/flutter/engine/src/flutter/tools/fuchsia/../../../out/fuchsia_debug_x64', 'flutter', '']' returned non-zero exit status 1

Co-authored-by: Hunter Freyer <hjfreyer@google.com>
2021-04-08 14:48:28 -07:00
Chris Bracken
9b4a0264d5 Correct typos throughout the engine/embedder (flutter/engine#25346)
Used the the `misspell` tool available at
https://github.com/client9/misspell, then applied hand-corrections. It's
possible we could adopt this as a presubmit, but there are still enough
false positives that it may not be worth the effort.
2021-04-01 11:08:19 -07:00
Chase Latta
74c7cac41a use a single clang toolchain (flutter/engine#23842) 2021-01-25 13:23:04 -08:00
Chase Latta
d2ecff7969 Reland - bump fuchsia toolchain to clang 12 (flutter/engine#23656) 2021-01-13 13:46:52 -08:00
Chase Latta
b203aaaa99 Revert "bump fuchsia toolchain to clang-12" (flutter/engine#23456) 2021-01-06 11:14:49 -08:00