Add Dart IO entry points to the snapshotter command line (#4257)

This commit is contained in:
Jason Simmons 2016-05-31 10:51:28 -07:00
parent b4002506e7
commit 49c4064132

View File

@ -117,11 +117,12 @@ Future<String> _buildAotSnapshot(
return null;
}
String entryPointsDir, genSnapshot;
String entryPointsDir, dartEntryPointsDir, genSnapshot;
String engineSrc = tools.engineSrcPath;
if (engineSrc != null) {
entryPointsDir = path.join(engineSrc, 'sky', 'engine', 'bindings');
dartEntryPointsDir = path.join(engineSrc, 'dart', 'runtime', 'bin');
String engineOut = tools.getEngineArtifactsDirectory(platform, buildMode).path;
if (platform == TargetPlatform.ios) {
genSnapshot = path.join(engineOut, 'clang_x64', 'gen_snapshot');
@ -132,6 +133,7 @@ Future<String> _buildAotSnapshot(
} else {
String artifactsDir = tools.getEngineArtifactsDirectory(platform, buildMode).path;
entryPointsDir = artifactsDir;
dartEntryPointsDir = entryPointsDir;
if (platform == TargetPlatform.ios) {
genSnapshot = path.join(artifactsDir, 'gen_snapshot');
} else {
@ -148,6 +150,7 @@ Future<String> _buildAotSnapshot(
String rodataBlob = path.join(outputDir.path, 'snapshot_aot_rodata');
String vmEntryPoints = path.join(entryPointsDir, 'dart_vm_entry_points.txt');
String ioEntryPoints = path.join(dartEntryPointsDir, 'dart_io_entries.txt');
String packagesPath = path.absolute(Directory.current.path, 'packages');
if (!FileSystemEntity.isDirectorySync(packagesPath)) {
@ -174,6 +177,7 @@ Future<String> _buildAotSnapshot(
List<String> filePaths = <String>[
genSnapshot,
vmEntryPoints,
ioEntryPoints,
mojoInternalPath,
uiPath,
jniPath,
@ -226,9 +230,8 @@ Future<String> _buildAotSnapshot(
];
if (!interpreter) {
genSnapshotCmd.addAll(<String>[
'--embedder_entry_points_manifest=$vmEntryPoints',
]);
genSnapshotCmd.add('--embedder_entry_points_manifest=$vmEntryPoints');
genSnapshotCmd.add('--embedder_entry_points_manifest=$ioEntryPoints');
}
switch (platform) {