link platform should be true for profile (#44279)
This commit is contained in:
@@ -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>[]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user