From ceade39c83cf0832b53c4e0fbf17eee6081201ca Mon Sep 17 00:00:00 2001 From: Todd Volkert Date: Thu, 26 Apr 2018 07:11:06 -0700 Subject: [PATCH] Revert "Extract Xxd class for iOS AOT snapshotting (#16986)" (#17003) This reverts commit 4bb7496b6243b13e14712b3b5702928c831a329f. --- .../lib/src/commands/build_aot.dart | 16 +++++++--------- packages/flutter_tools/lib/src/ios/mac.dart | 8 -------- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/packages/flutter_tools/lib/src/commands/build_aot.dart b/packages/flutter_tools/lib/src/commands/build_aot.dart index 04ff0a9436..f7a751d598 100644 --- a/packages/flutter_tools/lib/src/commands/build_aot.dart +++ b/packages/flutter_tools/lib/src/commands/build_aot.dart @@ -16,7 +16,7 @@ import '../build_info.dart'; import '../compile.dart'; import '../dart/package_map.dart'; import '../globals.dart'; -import '../ios/mac.dart' show xcode, xxd; +import '../ios/mac.dart' show xcode; import '../resident_runner.dart'; import '../runner/flutter_command.dart'; import 'build.dart'; @@ -422,14 +422,12 @@ Future _buildAotSnapshot( await fs.file(vmSnapshotData).rename(fs.path.join(outputDir.path, kVmSnapshotData)); await fs.file(isolateSnapshotData).rename(fs.path.join(outputDir.path, kIsolateSnapshotData)); - await xxd.run( - ['--include', kVmSnapshotData, fs.path.basename(kVmSnapshotDataC)], - workingDirectory: outputDir.path, - ); - await xxd.run( - ['--include', kIsolateSnapshotData, fs.path.basename(kIsolateSnapshotDataC)], - workingDirectory: outputDir.path, - ); + await runCheckedAsync([ + 'xxd', '--include', kVmSnapshotData, fs.path.basename(kVmSnapshotDataC) + ], workingDirectory: outputDir.path); + await runCheckedAsync([ + 'xxd', '--include', kIsolateSnapshotData, fs.path.basename(kIsolateSnapshotDataC) + ], workingDirectory: outputDir.path); await xcode.cc(commonBuildOptions.toList()..addAll(['-c', kVmSnapshotDataC, '-o', kVmSnapshotDataO])); await xcode.cc(commonBuildOptions.toList()..addAll(['-c', kIsolateSnapshotDataC, '-o', kIsolateSnapshotDataO])); diff --git a/packages/flutter_tools/lib/src/ios/mac.dart b/packages/flutter_tools/lib/src/ios/mac.dart index 3b94debc1a..7d1c8ba253 100644 --- a/packages/flutter_tools/lib/src/ios/mac.dart +++ b/packages/flutter_tools/lib/src/ios/mac.dart @@ -39,8 +39,6 @@ IMobileDevice get iMobileDevice => context[IMobileDevice]; Xcode get xcode => context[Xcode]; -Xxd get xxd => context[Xxd]; - class PythonModule { const PythonModule(this.name); @@ -105,12 +103,6 @@ class IMobileDevice { } } -class Xxd { - Future run(List args, {String workingDirectory}) { - return runCheckedAsync(['xxd']..addAll(args), workingDirectory: workingDirectory); - } -} - class Xcode { bool get isInstalledAndMeetsVersionCheck => isInstalled && isVersionSatisfactory;