Commit 49c40641 authored by Jason Simmons's avatar Jason Simmons

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

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