diff --git a/DEPS b/DEPS index 1aca4272db78a..d8e5919a9f2c6 100644 --- a/DEPS +++ b/DEPS @@ -17,7 +17,7 @@ vars = { 'skia_git': 'https://skia.googlesource.com', 'llvm_git': 'https://llvm.googlesource.com', 'skia_revision': 'e7b8d078851fd505475fe74359e31a421e6968ea', - "dart_sdk_revision": "bcca0e4e042c1c7cfe995a2e636eeb4fc01012f6", + "dart_sdk_revision": "2d2db80620f5ab42e5260f61663795e1ae13cf0e", "dart_sdk_git": "git@github.com:shorebirdtech/dart-sdk.git", "updater_git": "https://github.com/shorebirdtech/updater.git", "updater_rev": "ab23721e35d2e740026def44e1469e17e3440c83", diff --git a/packages/flutter_tools/lib/src/base/build.dart b/packages/flutter_tools/lib/src/base/build.dart index ccb9e1dcfc724..87db5142fb1d7 100644 --- a/packages/flutter_tools/lib/src/base/build.dart +++ b/packages/flutter_tools/lib/src/base/build.dart @@ -129,20 +129,27 @@ class AOTSnapshotter { final Directory outputDir = _fileSystem.directory(outputPath); outputDir.createSync(recursive: true); - final List dumpClassTableLinkInfoArgs = [ + // Currently we only use the linker on iOS, but we will eventually split out + // the concept of "optimizes patch snapshot" from "uses linker" and probably + // only uses the linker on iOS, but optimize patch snapshots everywhere. + // TODO(eseidel): TargetPlatform.darwin doesn't use the linker. + bool usesLinker = (platform == TargetPlatform.ios || platform == TargetPlatform.darwin); + final List dumpLinkInfoArgs = [ // Shorebird dumps the class table information during snapshot compilation which is later used during linking. '--print_class_table_link_debug_info_to=${_fileSystem.path.join(outputDir.parent.path, 'App.class_table.json')}', '--print_class_table_link_info_to=${_fileSystem.path.join(outputDir.parent.path, 'App.ct.link')}', '--print_field_table_link_debug_info_to=${_fileSystem.path.join(outputDir.parent.path, 'App.field_table.json')}', '--print_field_table_link_info_to=${_fileSystem.path.join(outputDir.parent.path, 'App.ft.link')}', + '--print_dispatch_table_link_debug_info_to=${_fileSystem.path.join(outputDir.parent.path, 'App.dispatch_table.json')}', + '--print_dispatch_table_link_info_to=${_fileSystem.path.join(outputDir.parent.path, 'App.dt.link')}', ]; final List genSnapshotArgs = [ // Shorebird uses --deterministic to improve snapshot stability and increase linking. '--deterministic', - // Only use the default Shorebird gen_snapshot args on iOS. - if (platform == TargetPlatform.ios || platform == TargetPlatform.darwin) - ...dumpClassTableLinkInfoArgs, + // Only save LinkInfo if we're using the linker. + if (usesLinker) + ...dumpLinkInfoArgs, ]; final bool targetingApplePlatform = diff --git a/packages/flutter_tools/lib/src/build_system/targets/common.dart b/packages/flutter_tools/lib/src/build_system/targets/common.dart index fa75bff9bc4b7..953ad0c0c8b91 100644 --- a/packages/flutter_tools/lib/src/build_system/targets/common.dart +++ b/packages/flutter_tools/lib/src/build_system/targets/common.dart @@ -486,6 +486,8 @@ abstract final class LinkSupplement { // into the shorebird directory. maybeCopy('App.ct.link'); maybeCopy('App.class_table.json'); + maybeCopy('App.dt.link'); + maybeCopy('App.dispatch_table.json'); maybeCopy('App.ft.link'); maybeCopy('App.field_table.json'); }