From 49c40641325fc63fc2fb212f2b9f9d89edd4d3d7 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Tue, 31 May 2016 10:51:28 -0700 Subject: [PATCH] Add Dart IO entry points to the snapshotter command line (#4257) --- .../flutter_tools/lib/src/commands/build_aot.dart | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/flutter_tools/lib/src/commands/build_aot.dart b/packages/flutter_tools/lib/src/commands/build_aot.dart index 53c78dffb6..10d352e989 100644 --- a/packages/flutter_tools/lib/src/commands/build_aot.dart +++ b/packages/flutter_tools/lib/src/commands/build_aot.dart @@ -117,11 +117,12 @@ Future _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 _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 _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 _buildAotSnapshot( List filePaths = [ genSnapshot, vmEntryPoints, + ioEntryPoints, mojoInternalPath, uiPath, jniPath, @@ -226,9 +230,8 @@ Future _buildAotSnapshot( ]; if (!interpreter) { - genSnapshotCmd.addAll([ - '--embedder_entry_points_manifest=$vmEntryPoints', - ]); + genSnapshotCmd.add('--embedder_entry_points_manifest=$vmEntryPoints'); + genSnapshotCmd.add('--embedder_entry_points_manifest=$ioEntryPoints'); } switch (platform) {