mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
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
This commit is contained in:
parent
84fe2adedb
commit
0cf4033404
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user