anchor.diff:      await outputDir.childFile('frontend_server.d')
           .writeAsString('frontend_server.d: ${artifacts.getArtifactPath(Artifact.frontendServerSnapshotForEngineDartSdk)}\n');
   
  -    genSnapshotCmd.addAll(<String>[
  +    genSnapshotArgs.addAll(<String>[
         '--reify-generic-functions',
         '--strong',
       ]);
     }
   
  -  genSnapshotCmd.add(mainPath);
  -
  -  final RunResult results = await runAsync(genSnapshotCmd);
  -  if (results.exitCode != 0) {
  -    printError('Dart snapshot generator failed with exit code ${results.exitCode}');
  -    printError(results.toString());
  +  genSnapshotArgs.add(mainPath);
  +
  +  final int genSnapshotExitCode = await genSnapshot.run(
  +    snapshotType: new SnapshotType(platform, buildMode),
  +    packagesPath: packageMap.packagesPath,
  +    depfilePath: dependencies,
  +    additionalArgs: genSnapshotArgs,
  +  );
  +  if (genSnapshotExitCode != 0) {
  +    printError('Dart snapshot generator failed with exit code $genSnapshotExitCode');
       return null;
     }
   
  
positive.code:       break;
      case TargetPlatform.ios:
        if (interpreter) {
          genSnapshotCmd.add('--snapshot_kind=core');
          genSnapshotCmd.add(snapshotDartIOS);
          outputPaths.addAll(<String>[
            kVmSnapshotDataO,
            kIsolateSnapshotDataO,
          ]);
        } else {
          genSnapshotCmd.add('--snapshot_kind=app-aot-assembly');
          genSnapshotCmd.add('--assembly=$assembly');
          outputPaths.add(assemblyO);
        }
        break;
  
negative.code:     case TargetPlatform.android_x64:
      case TargetPlatform.android_x86:
        if (compileToSharedLibrary) {
          genSnapshotArgs.add('--snapshot_kind=app-aot-assembly');
          genSnapshotArgs.add('--assembly=$assembly');
          outputPaths.add(assemblySo);
        } else {
          genSnapshotArgs.addAll(<String>[
            '--snapshot_kind=app-aot-blobs',
            '--vm_snapshot_instructions=$vmSnapshotInstructions',
            '--isolate_snapshot_instructions=$isolateSnapshotInstructions',
          ]);
        }
        if (platform == TargetPlatform.android_arm) {
          genSnapshotArgs.addAll(<String>[
            '--no-sim-use-hardfp', // Android uses the softfloat ABI.
            '--no-use-integer-division', // Not supported by the Pixel in 32-bit mode.
          ]);
  