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