Commit Graph

72 Commits

Author SHA1 Message Date
Ryan Macnak
965dc52e2e Disable usage of bare instructions in AOT (#27410)
Issue #27250
2019-02-05 13:52:59 -08:00
Konstantin Scheglov
4fe41abfcc
Add default values for optional parameters. (#27197) 2019-01-29 11:49:57 -08:00
Stanislav Baranov
55f3da7afc
Flutter tool support for building dynamic updates (#25576) 2018-12-19 16:27:47 -08:00
Stanislav Baranov
0d4f279fb8
Read correct cached VM snapshot in dynamic mode (PRODUCT vs RELEASE) (#25472) 2018-12-18 12:53:30 -08:00
Ryan Macnak
d92d175bcb Opt into deterministic snapshots.
Also, remove old flags.
2018-11-07 14:44:20 -08:00
Stanislav Baranov
570ae840f2
Remove unused deps and flags from flutter tool. (#22571) 2018-10-09 13:04:06 -07:00
Stanislav Baranov
54c10f44b2
Implement build flow for hot updates on Android (#22391)
This also involves switching from Core JIT to App JIT snapshot, and replacing per-isolate VM snapshot with the shared VM snapshot.

For now there is no separate update bundle file, as the generated update gets packaged directly into the APK for testing purposes.
2018-09-28 13:58:37 -07:00
Alexander Markov
83cdb5738e
Cleanup uses of entry points files (#22098) 2018-09-20 15:10:41 -07:00
Alexandre Ardhuin
d927c93310
Unnecessary new (#20138)
* enable lint unnecessary_new

* fix tests

* fix tests

* fix tests
2018-09-12 08:29:29 +02:00
Chris Bracken
ac8b906cb4
Eliminate support for Dart 1 in AOT snapshotter (#21388) 2018-09-04 10:17:12 -07:00
Chris Bracken
ed0b8be041
Eliminate script snapshot support (#21387)
Script snapshots were only every used in Dart 1 mode, which is no longer
supported.
2018-09-04 10:05:26 -07:00
Stanislav Baranov
b5b55447a4
Remove unused snapshot.d depfile parameter (#20584) 2018-08-16 08:47:20 -07:00
Stanislav Baranov
2c0329a103
Replace flutter --build-snapshot with --precompile that takes input (#20574) 2018-08-16 08:46:57 -07:00
Ian Hickson
686d8f8a22 Shim package:test to avoid matcher issues (#20602)
* Upgrade everything except matcher.
* Roll matcher (and test)
* Adjust tests that depend on flutter:test directly to depend on a shim
* Require use of package:test shim and remove other references to package:test
2018-08-14 20:33:58 -07:00
Ryan Macnak
b8b6d4166c
Build snapshots with --sync-async to match the engine. (#19495)
Bug: https://github.com/flutter/flutter/issues/19494
2018-07-17 18:07:54 -07:00
Ian Hickson
35ad2a786d
Remove race conditions involving finding available ports (#18698)
This is an attempt to reland #18488 with less breakage on macOS.
2018-06-27 16:44:28 -07:00
Greg Spencer
08d1ec36de Roll engine to 0c119932c0d6cb30dafd75ec717d1eda76fd7651 (#18575) 2018-06-19 09:58:20 +02:00
Ian Hickson
0fa5ba43a1
Revert "Remove race conditions involving finding available ports (#18488)" (#18521)
This reverts commit 7750872251.
2018-06-15 15:37:20 -07:00
Ian Hickson
7750872251
Remove race conditions involving finding available ports (#18488) 2018-06-15 14:16:18 -07:00
Stanislav Baranov
bcaf026c08
Add flutter tool support for creating app-specific VM snapshots. (#18417)
Add flutter tool support for creating app-specific VM snapshots.
2018-06-15 11:53:30 -07:00
Chris Bracken
2ae48845a8
Revert elimination of Dart 1 (#18460)
fuchsia_tester.dart still assumes Dart 1. Previously, it ran tests directly
from source, flutter_platform.dart automatically runs a kernel compile when
operating in Dart 2 mode, but this assumes a functional Dart SDK is available
in the artifacts directly, and fuchsia_tester.dart mocks out the artifacts
directory with an empty temp dir.

Remaining work is:
1. Get the frontend server building as a dependency on Fuchsia.
2. Patch fuchsia_tester.dart to use a valid Dart SDK and frontend server.

This also reverts migration to Dart 2 typedef syntax.

This reverts commit 6c56bb2. (#18362)
This reverts commit 3daebd0. (#18316)
2018-06-13 12:46:39 -07:00
Chris Bracken
3daebd059c
It's time to #deleteDart1 (again) (#18316)
* It's time to #deleteDart1 (#18293)

Eliminates support for Dart 1 in flutter_tools, and drops our Dart 1
benchmarks. All commands now run in Dart 1 mode only.

Eliminates --preview-dart-2 / --no-preview-dart-2 support.

* Fix indentation, remove no longer necessary .toList()

* Only push udpated kernel if >0 invalidated srcs
2018-06-08 15:49:24 -07:00
Chris Bracken
9495df4bc3
Revert "It's time to #deleteDart1 (#18293)" (#18313)
Several benchmarks started failing during kernel compile:
1. Timeouts:
   * commands_test
   * hot_mode_dev_cycle__benchmark
   * run_machine_concurrent_hot_reload
   * service_extensions_test

2. Kernel compiler crash:
   * hot_mode_dev_cycle_linux__benchmark
   * routing_test

3. Unexpected termination:
   * hot_mode_dev_cycle_win__benchmark

This reverts commit ed63e7082a.
2018-06-08 12:43:11 -07:00
Chris Bracken
ed63e7082a
It's time to #deleteDart1 (#18293)
Eliminates support for Dart 1 in flutter_tools, and drops our Dart 1
benchmarks. All commands now run in Dart 1 mode only.

Eliminates --preview-dart-2 / --no-preview-dart-2 support.
2018-06-08 11:04:57 -07:00
Keerti Parthasarathy
da7670c2ee
Fixes for test failures in Dart 2 mode (#18122) 2018-06-05 12:38:30 -07:00
Alexandre Ardhuin
09276bea25
enable lint prefer_equal_for_default_values (#18156) 2018-06-05 08:50:40 +02:00
Vyacheslav Egorov
4931b46772
Make --build-shared-library more robust. (#17420)
* Search for a suitable ARM sysroot instead of hardcoding it;
* Add facility to explain why NDK was not found;
2018-05-14 16:36:54 +02:00
Chris Bracken
1605fbb31a
Add more unit tests for AOT snapshotting (#17493)
Adds unit tests for the following AOT build configurations:
* iOS armv7 profile
* iOS armv7 release
* Android armv7 profile (AOT blob)
* Android arm64 profile (AOT blob)
* Android armv7 release (AOT blob)
* Android arm64 release (AOT blob)
2018-05-10 17:45:51 -07:00
Chris Bracken
1c27a458a8
Correct profile-mode AOT snapshot flags (#17435)
Previously, in non-release (i.e. profile) AOT builds, we were setting
--no-checked and --conditional_directives flags. --no-checked is the
default, and we don't make use of conditional directives in Flutter.
2018-05-09 12:31:36 -07:00
Chris Bracken
8b8d368d2b
Replace --prefer-shared-library with --build-shared-library (#17394)
This replaces the --prefer-shared-library flag, which falls back to
regular (non-shared-lib) compile if the NDK is not found, with the
--build-shared-library flag, which exits with an error message if the
NDK is not found.

This simplifies the set of allowed code paths through AOT compile,
resulting in better testability and easier-to-follow logic. It also
results in more predictable behaviour for continuous integration and
other scenarios.
2018-05-08 17:28:53 -07:00
Chris Bracken
231b9425d6
Block debug AOT snapshot builds (#17393)
We previously blocked iOS AOT builds, but Android debug builds are
always JIT builds.
2018-05-08 11:06:58 -07:00
Chris Bracken
849676fc7f
Support multi-arch iOS binaries (#17312)
This change adds support for armv7, arm64, and universal iOS apps.

This change eliminates iOS target architecture hardcoding (previously
arm64 only) and uses the target architecture(s) specified in Xcode's
ARCHS setting ('Architectures' in Xcode Build Settings).

For universal binaries, set ARCHS to its default value, $(ARCHS_STANDARD).

Note that after changing the architecture in Xcode, developers should
run 'pod install' from the ios subdirectory of their project. A separate
change (that will land before this one) will add support for
automatically detecting project file and Podfile changes and re-running
pod install if necessary.

This change also adds an --ios-arch option to flutter build aot. In iOS
AOT builds (in profile and release mode), this dictates which
architectures are built into App.framework. This flag should generally
be unnecessary to set manually since flutter build aot is typically only
invoked internally by flutter itself.
2018-05-06 18:43:07 -07:00
Chris Bracken
66c7b6a935
Add Fingerprinter class (#17255)
Adds a Fingerprinter utility class that can be used to compute unique
fingerprints for a set of input paths and build options, compare to the
output of a previous run, and skip the build action if no inputs or
options have changed. The existing Fingerprint class still does all the
heavy lifting. Fingerprinter adds common operations such as
reading/writing/comparing fingerprints and parsing depfiles.

This migrates existing uses of Fingerprint over to Fingerprinter.

This also adds better fingerprinting to AOT snapshotting, which
previously failed to include several options in its fingerprint
(--preview-dart-2, --prefer-shared-library).
2018-05-03 17:31:37 -07:00
Chris Bracken
802301e16f
Extract shared library build from AOT snapshotting (#17166) 2018-05-01 15:14:20 -07:00
Chris Bracken
c77ceb01be
Eliminate unnecessary params in assembly AOT (#17164)
Previously, we were incorrectly passing --vm_snapshot_data and
--isolate_snapshot_data options to gen_snapshot in assembly AOT builds.
These only make sense in AOT blob snapshot mode (alongside
--vm_snapshot_instructions and --isolate_snapshot_instructions).
2018-05-01 13:20:02 -07:00
Chris Bracken
42ed01522d
Split Snapshotter into AOT and Script classes (#17159)
There's very little code-sharing between the two, and what little there
is is concentrated in the GenSnapshotClass and the fingerprint
reading/writing utility methods.
2018-05-01 12:42:05 -07:00
Chris Bracken
68a1e2f7aa
Simplify iOS debug build (#17145)
iOS debug builds always run in interpreted mode whether on device or on
simulator. In both cases, we can skip snapshotting and link against an
empty App.framework. Previously, we did this for iOS simulator builds.
This does the same for device builds.

Previously, debug iOS builds used gen_snapshot to generate a core
snapshot, then used 'xxd' to generate C files containing the snapshot
data in buffers named kDartVmSnapshotData and kDartIsolateSnapshotData,
which are then compiled/linked into App.framework. This is unnecessary
since the VM compiled into Flutter.framework already contains this data.
2018-04-30 19:51:30 -07:00
Chris Bracken
c3d43ef4a7
Improve AOT snapshot input verification + cleanup (#17144)
Bugfix: Moves AOT snapshot input verification past where the last input
is added to the inputs list.

Cleanup:
* Extracts _isValidAotPlatform method.
* Moves non-platform-specific logic to the top.
* Moves variable declaration closer to first use, and inlines to a
  narrower scope where possible.

This relands #17136, which was reverted in #17142 due to breakage in
on-device iOS debug builds.
2018-04-30 19:15:09 -07:00
Chris Bracken
d19bdc4339
Revert "Improve AOT snapshot input verification + cleanup (#17136)" (#17142)
This reverts commit 100be23a34.
2018-04-30 17:34:36 -07:00
Chris Bracken
100be23a34
Improve AOT snapshot input verification + cleanup (#17136)
Bugfix: Moves AOT snapshot input verification past where the last input
is added to the inputs list.

Cleanup:
* Extracts _isValidAotPlatform method.
* Moves non-platform-specific logic to the top.
* Moves variable declaration closer to first use, and inlines to a
  narrower scope where possible.
2018-04-30 16:47:03 -07:00
Chris Bracken
cdbb2385f1
Extract kernel compile from buildAotSnapshot (#17062)
Moves the kernel compile step to the beginning of the AOT build in a
separate method. This is pre-factoring for iOS universal builds where
the kernel build happens once, but we then snapshot twice: once for
armv7 and once for arm64.

This also writes dependencies to build/kernel_compile.d rather than
build/aot/snapshot.d, since that is immediately overwritten by
gen_snapshot.
2018-04-29 10:47:34 -07:00
Chris Bracken
fe0de001d9
Eliminate unnecessary buildAotSnapshot parameter (#17056)
This isn't user-specifiable through a flag, so no need to pass it as a
parameter.
2018-04-27 15:51:07 -07:00
Chris Bracken
ebcd08c6ef
Eliminate build aot --interpreter flag (#17025) (#17033)
This is required for iOS debug builds, but unused otherwise. In theory,
Android debug builds could be run in this mode, but this is historically
untested and adds unnecessary complexity to the code. If ad-hoc testing
is required, it can be patched in when necessary.

This re-lands 8c4f0c0d21 with a fix to
xcode_backend.sh to eliminate the use of --interpreter.
2018-04-26 17:25:23 -07:00
Chris Bracken
e3247a3629
Revert "Eliminate build aot --interpreter flag (#17025)" (#17032)
Requires a fix to xcode_backend.sh. Will followup momentarily with that
fix.

This reverts commit 8c4f0c0d21.
2018-04-26 16:30:16 -07:00
Chris Bracken
8c4f0c0d21
Eliminate build aot --interpreter flag (#17025)
This is required for iOS debug builds, but unused otherwise. In theory,
Android debug builds could be run in this mode, but this is historically
untested and adds unnecessary complexity to the code. If ad-hoc testing
is required, it can be patched in when necessary.
2018-04-26 16:07:10 -07:00
Chris Bracken
82f969ff05
Move AOT snapshotting to Snapshotter class (#17015)
This moves AOT snapshotting out of build_aot.dart and into the
Snapshotter class. It also adds unit tests for iOS debug, profile, and
release builds.
2018-04-26 14:37:39 -07:00
Chris Bracken
b45a260534
Make FakeGenSnapshot's outputs mutable for tests (#16976)
This simplifies tests by allowing the test author to express the outputs
they'd like the snapshotter to generate without creating a whole new
instance and context with the additional overrides.

Also sets the default set of outputs to none, setting them instead in
the setUp function for script snapshotting.
2018-04-25 20:50:33 -07:00
Chris Bracken
f570e046c9
Inline buildScriptSnapshot calls (#16940) 2018-04-24 16:07:14 -07:00
Chris Bracken
993f3947da
Generalise FakeGenSnapshot output generation (#16938)
Pre-factoring for addition of AOT snapshotting unit tests, which emit a
different set of expected outputs.
2018-04-24 15:51:10 -07:00
Chris Bracken
de8a53c55b
Rename buildSnapshot to buildScriptSnapshot (#16905)
Renames buildSnapshot to build buildScriptSnapshot in preparation for
AOT snapshot tests.
2018-04-23 16:51:34 -07:00