Commit 52fbcefe authored by Alexander Aprelev's avatar Alexander Aprelev Committed by GitHub

Link platform.dill only into app kernel file used for build aot. (#12571)

gen_snapshot loads all packages from single app kernel file.
parent 1f82733a
...@@ -307,6 +307,7 @@ Future<String> _buildAotSnapshot( ...@@ -307,6 +307,7 @@ Future<String> _buildAotSnapshot(
sdkRoot: artifacts.getArtifactPath(Artifact.flutterPatchedSdkPath), sdkRoot: artifacts.getArtifactPath(Artifact.flutterPatchedSdkPath),
mainPath: mainPath, mainPath: mainPath,
extraFrontEndOptions: extraFrontEndOptions, extraFrontEndOptions: extraFrontEndOptions,
linkPlatformKernelIn : true,
); );
} }
......
...@@ -59,6 +59,7 @@ class _StdoutHandler { ...@@ -59,6 +59,7 @@ class _StdoutHandler {
Future<String> compile( Future<String> compile(
{String sdkRoot, {String sdkRoot,
String mainPath, String mainPath,
bool linkPlatformKernelIn : false,
List<String> extraFrontEndOptions}) async { List<String> extraFrontEndOptions}) async {
final String frontendServer = artifacts.getArtifactPath( final String frontendServer = artifacts.getArtifactPath(
Artifact.frontendServerSnapshotForEngineDartSdk Artifact.frontendServerSnapshotForEngineDartSdk
...@@ -73,6 +74,8 @@ Future<String> compile( ...@@ -73,6 +74,8 @@ Future<String> compile(
'--sdk-root', '--sdk-root',
sdkRoot, sdkRoot,
]; ];
if (!linkPlatformKernelIn)
command.add('--no-link-platform');
if (extraFrontEndOptions != null) if (extraFrontEndOptions != null)
command.addAll(extraFrontEndOptions); command.addAll(extraFrontEndOptions);
command.add(mainPath); command.add(mainPath);
......
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