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 {
platform: targetPlatform,
mode: buildMode,
),
aot: buildMode != BuildMode.debug,
aot: buildMode.isPrecompiled,
buildMode: buildMode,
trackWidgetCreation: trackWidgetCreation && buildMode == BuildMode.debug,
targetModel: targetModel,
outputFilePath: environment.buildDir.childFile('app.dill').path,
packagesPath: packagesPath,
linkPlatformKernelIn: buildMode == BuildMode.release,
linkPlatformKernelIn: buildMode.isPrecompiled,
mainPath: targetFileAbsolute,
depFilePath: environment.buildDir.childFile('kernel_snapshot.d').path,
);
......
......@@ -159,6 +159,7 @@ flutter_tools:lib/''');
depFilePath: anyNamed('depFilePath'),
packagesPath: anyNamed('packagesPath'),
mainPath: anyNamed('mainPath'),
linkPlatformKernelIn: anyNamed('linkPlatformKernelIn'),
)).thenAnswer((Invocation _) async {
return const CompilerOutput('example', 0, <Uri>[]);
});
......@@ -183,11 +184,14 @@ flutter_tools:lib/''');
depFilePath: anyNamed('depFilePath'),
packagesPath: anyNamed('packagesPath'),
mainPath: anyNamed('mainPath'),
linkPlatformKernelIn: false,
)).thenAnswer((Invocation _) async {
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>{
KernelCompilerFactory: () => MockKernelCompilerFactory(),
}));
......@@ -207,6 +211,7 @@ flutter_tools:lib/''');
depFilePath: anyNamed('depFilePath'),
packagesPath: anyNamed('packagesPath'),
mainPath: anyNamed('mainPath'),
linkPlatformKernelIn: false,
)).thenAnswer((Invocation _) async {
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