mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Ensure flutter run build is done in incremental mode. (#107184)
* Ensure build is done in incremental mode. This allows for faster bootstrapping of the compiler from previously created dill file. Fixes https://github.com/flutter/flutter/issues/107183 * Avoid initializeFromDill in aot mode * Update tests
This commit is contained in:
parent
043f0f7ea9
commit
b1410c2ce7
@ -226,6 +226,8 @@ class KernelSnapshot extends Target {
|
|||||||
trackWidgetCreation: trackWidgetCreation && buildMode != BuildMode.release,
|
trackWidgetCreation: trackWidgetCreation && buildMode != BuildMode.release,
|
||||||
targetModel: targetModel,
|
targetModel: targetModel,
|
||||||
outputFilePath: environment.buildDir.childFile('app.dill').path,
|
outputFilePath: environment.buildDir.childFile('app.dill').path,
|
||||||
|
initializeFromDill: buildMode.isPrecompiled ? null :
|
||||||
|
environment.buildDir.childFile('app.dill').path,
|
||||||
packagesPath: packagesFile.path,
|
packagesPath: packagesFile.path,
|
||||||
linkPlatformKernelIn: forceLinkPlatform || buildMode.isPrecompiled,
|
linkPlatformKernelIn: forceLinkPlatform || buildMode.isPrecompiled,
|
||||||
mainPath: targetFileAbsolute,
|
mainPath: targetFileAbsolute,
|
||||||
|
@ -315,6 +315,7 @@ class KernelCompiler {
|
|||||||
fileSystemScheme,
|
fileSystemScheme,
|
||||||
],
|
],
|
||||||
if (initializeFromDill != null) ...<String>[
|
if (initializeFromDill != null) ...<String>[
|
||||||
|
'--incremental',
|
||||||
'--initialize-from-dill',
|
'--initialize-from-dill',
|
||||||
initializeFromDill,
|
initializeFromDill,
|
||||||
],
|
],
|
||||||
|
@ -257,6 +257,9 @@ void main() {
|
|||||||
'$build/app.dill',
|
'$build/app.dill',
|
||||||
'--depfile',
|
'--depfile',
|
||||||
'$build/kernel_snapshot.d',
|
'$build/kernel_snapshot.d',
|
||||||
|
'--incremental',
|
||||||
|
'--initialize-from-dill',
|
||||||
|
'$build/app.dill',
|
||||||
'--verbosity=error',
|
'--verbosity=error',
|
||||||
'file:///lib/main.dart',
|
'file:///lib/main.dart',
|
||||||
], stdout: 'result $kBoundaryKey\n$kBoundaryKey\n$kBoundaryKey $build/app.dill 0\n'),
|
], stdout: 'result $kBoundaryKey\n$kBoundaryKey\n$kBoundaryKey $build/app.dill 0\n'),
|
||||||
@ -295,6 +298,9 @@ void main() {
|
|||||||
'$build/app.dill',
|
'$build/app.dill',
|
||||||
'--depfile',
|
'--depfile',
|
||||||
'$build/kernel_snapshot.d',
|
'$build/kernel_snapshot.d',
|
||||||
|
'--incremental',
|
||||||
|
'--initialize-from-dill',
|
||||||
|
'$build/app.dill',
|
||||||
'--verbosity=error',
|
'--verbosity=error',
|
||||||
'file:///lib/main.dart',
|
'file:///lib/main.dart',
|
||||||
], stdout: 'result $kBoundaryKey\n$kBoundaryKey\n$kBoundaryKey $build/app.dill 0\n'),
|
], stdout: 'result $kBoundaryKey\n$kBoundaryKey\n$kBoundaryKey $build/app.dill 0\n'),
|
||||||
@ -348,6 +354,9 @@ void main() {
|
|||||||
'$build/app.dill',
|
'$build/app.dill',
|
||||||
'--depfile',
|
'--depfile',
|
||||||
'$build/kernel_snapshot.d',
|
'$build/kernel_snapshot.d',
|
||||||
|
'--incremental',
|
||||||
|
'--initialize-from-dill',
|
||||||
|
'$build/app.dill',
|
||||||
'--verbosity=error',
|
'--verbosity=error',
|
||||||
'file:///lib/main.dart',
|
'file:///lib/main.dart',
|
||||||
], stdout: 'result $kBoundaryKey\n$kBoundaryKey\n$kBoundaryKey /build/653e11a8e6908714056a57cd6b4f602a/app.dill 0\n'),
|
], stdout: 'result $kBoundaryKey\n$kBoundaryKey\n$kBoundaryKey /build/653e11a8e6908714056a57cd6b4f602a/app.dill 0\n'),
|
||||||
|
Loading…
Reference in New Issue
Block a user