From 7f0876700a7d503ff97a5fb5776cc597b1271196 Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Wed, 2 May 2018 18:50:35 -0700 Subject: [PATCH] Handle multi-arch builds in Xcode lipo phase (#17212) Correctly split ARCHS into a Bash array in xcode_backend.sh. Previously, when ARCHS contained multiple values (e.g., ARCHS="armv7 arm64"), we treated that as a single architecture, and lipo invocation would fail. --- packages/flutter_tools/bin/xcode_backend.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/flutter_tools/bin/xcode_backend.sh b/packages/flutter_tools/bin/xcode_backend.sh index 6ed8833487d..0a28046b8c4 100755 --- a/packages/flutter_tools/bin/xcode_backend.sh +++ b/packages/flutter_tools/bin/xcode_backend.sh @@ -184,7 +184,8 @@ GetFrameworkExecutablePath() { LipoExecutable() { local executable="$1" shift - local archs=("$@") + # Split $@ into an array. + read -r -a archs <<< "$@" # Extract architecture-specific framework executables. local all_executables=() @@ -225,11 +226,10 @@ LipoExecutable() { ThinFramework() { local framework_dir="$1" shift - local archs=("$@") local plist_path="${framework_dir}/Info.plist" local executable="$(GetFrameworkExecutablePath "${framework_dir}")" - LipoExecutable "${executable}" "${archs[@]}" + LipoExecutable "${executable}" "$@" } ThinAppFrameworks() {