Unverified Commit aa333fda authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

link platform should be true for profile (#44279)

parent ed82bb82
...@@ -168,13 +168,13 @@ class KernelSnapshot extends Target { ...@@ -168,13 +168,13 @@ class KernelSnapshot extends Target {
platform: targetPlatform, platform: targetPlatform,
mode: buildMode, mode: buildMode,
), ),
aot: buildMode != BuildMode.debug, aot: buildMode.isPrecompiled,
buildMode: buildMode, buildMode: buildMode,
trackWidgetCreation: trackWidgetCreation && buildMode == BuildMode.debug, trackWidgetCreation: trackWidgetCreation && buildMode == BuildMode.debug,
targetModel: targetModel, targetModel: targetModel,
outputFilePath: environment.buildDir.childFile('app.dill').path, outputFilePath: environment.buildDir.childFile('app.dill').path,
packagesPath: packagesPath, packagesPath: packagesPath,
linkPlatformKernelIn: buildMode == BuildMode.release, linkPlatformKernelIn: buildMode.isPrecompiled,
mainPath: targetFileAbsolute, mainPath: targetFileAbsolute,
depFilePath: environment.buildDir.childFile('kernel_snapshot.d').path, depFilePath: environment.buildDir.childFile('kernel_snapshot.d').path,
); );
......
...@@ -159,6 +159,7 @@ flutter_tools:lib/'''); ...@@ -159,6 +159,7 @@ flutter_tools:lib/''');
depFilePath: anyNamed('depFilePath'), depFilePath: anyNamed('depFilePath'),
packagesPath: anyNamed('packagesPath'), packagesPath: anyNamed('packagesPath'),
mainPath: anyNamed('mainPath'), mainPath: anyNamed('mainPath'),
linkPlatformKernelIn: anyNamed('linkPlatformKernelIn'),
)).thenAnswer((Invocation _) async { )).thenAnswer((Invocation _) async {
return const CompilerOutput('example', 0, <Uri>[]); return const CompilerOutput('example', 0, <Uri>[]);
}); });
...@@ -183,11 +184,14 @@ flutter_tools:lib/'''); ...@@ -183,11 +184,14 @@ flutter_tools:lib/''');
depFilePath: anyNamed('depFilePath'), depFilePath: anyNamed('depFilePath'),
packagesPath: anyNamed('packagesPath'), packagesPath: anyNamed('packagesPath'),
mainPath: anyNamed('mainPath'), mainPath: anyNamed('mainPath'),
linkPlatformKernelIn: false,
)).thenAnswer((Invocation _) async { )).thenAnswer((Invocation _) async {
return const CompilerOutput('example', 0, <Uri>[]); return const CompilerOutput('example', 0, <Uri>[]);
}); });
await const KernelSnapshot().build(androidEnvironment..defines[kTrackWidgetCreation] = 'false'); await const KernelSnapshot().build(androidEnvironment
..defines[kBuildMode] = 'debug'
..defines[kTrackWidgetCreation] = 'false');
}, overrides: <Type, Generator>{ }, overrides: <Type, Generator>{
KernelCompilerFactory: () => MockKernelCompilerFactory(), KernelCompilerFactory: () => MockKernelCompilerFactory(),
})); }));
...@@ -207,6 +211,7 @@ flutter_tools:lib/'''); ...@@ -207,6 +211,7 @@ flutter_tools:lib/''');
depFilePath: anyNamed('depFilePath'), depFilePath: anyNamed('depFilePath'),
packagesPath: anyNamed('packagesPath'), packagesPath: anyNamed('packagesPath'),
mainPath: anyNamed('mainPath'), mainPath: anyNamed('mainPath'),
linkPlatformKernelIn: false,
)).thenAnswer((Invocation _) async { )).thenAnswer((Invocation _) async {
return const CompilerOutput('example', 0, <Uri>[]); return const CompilerOutput('example', 0, <Uri>[]);
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment