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

gen_snapshot loads all packages from single app kernel file.
This commit is contained in:
Alexander Aprelev 2017-10-17 13:30:32 -07:00 committed by GitHub
parent 1f82733a3b
commit 52fbcefed6
2 changed files with 4 additions and 0 deletions

View File

@ -307,6 +307,7 @@ Future<String> _buildAotSnapshot(
sdkRoot: artifacts.getArtifactPath(Artifact.flutterPatchedSdkPath),
mainPath: mainPath,
extraFrontEndOptions: extraFrontEndOptions,
linkPlatformKernelIn : true,
);
}

View File

@ -59,6 +59,7 @@ class _StdoutHandler {
Future<String> compile(
{String sdkRoot,
String mainPath,
bool linkPlatformKernelIn : false,
List<String> extraFrontEndOptions}) async {
final String frontendServer = artifacts.getArtifactPath(
Artifact.frontendServerSnapshotForEngineDartSdk
@ -73,6 +74,8 @@ Future<String> compile(
'--sdk-root',
sdkRoot,
];
if (!linkPlatformKernelIn)
command.add('--no-link-platform');
if (extraFrontEndOptions != null)
command.addAll(extraFrontEndOptions);
command.add(mainPath);