Unverified Commit 0cf40334 authored by Liam Appelbe's avatar Liam Appelbe Committed by GitHub

Switch iOS gen_snapshot from multi-arch binary to multiple binaries (#37445)

* Switch iOS gen_snapshot from multi-arch binary to multiple binaries

* Make snapshotterPath mutable
parent 84fe2ade
......@@ -54,15 +54,12 @@ class GenSnapshot {
...additionalArgs,
];
final String snapshotterPath = getSnapshotterPath(snapshotType);
String snapshotterPath = getSnapshotterPath(snapshotType);
// iOS gen_snapshot is a multi-arch binary. Running as an i386 binary will
// generate armv7 code. Running as an x86_64 binary will generate arm64
// code. /usr/bin/arch can be used to run binaries with the specified
// architecture.
// iOS has a separate gen_snapshot for armv7 and arm64 in the same,
// directory. So we need to select the right one.
if (snapshotType.platform == TargetPlatform.ios) {
final String hostArch = iosArch == IOSArch.armv7 ? '-i386' : '-x86_64';
return runCommandAndStreamOutput(<String>['/usr/bin/arch', hostArch, snapshotterPath, ...args]);
snapshotterPath += '_' + getNameForIOSArch(iosArch);
}
StringConverter outputFilter;
......
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