Unverified Commit 7f087670 authored by Chris Bracken's avatar Chris Bracken Committed by GitHub

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.
parent 27a2a27c
...@@ -184,7 +184,8 @@ GetFrameworkExecutablePath() { ...@@ -184,7 +184,8 @@ GetFrameworkExecutablePath() {
LipoExecutable() { LipoExecutable() {
local executable="$1" local executable="$1"
shift shift
local archs=("$@") # Split $@ into an array.
read -r -a archs <<< "$@"
# Extract architecture-specific framework executables. # Extract architecture-specific framework executables.
local all_executables=() local all_executables=()
...@@ -225,11 +226,10 @@ LipoExecutable() { ...@@ -225,11 +226,10 @@ LipoExecutable() {
ThinFramework() { ThinFramework() {
local framework_dir="$1" local framework_dir="$1"
shift shift
local archs=("$@")
local plist_path="${framework_dir}/Info.plist" local plist_path="${framework_dir}/Info.plist"
local executable="$(GetFrameworkExecutablePath "${framework_dir}")" local executable="$(GetFrameworkExecutablePath "${framework_dir}")"
LipoExecutable "${executable}" "${archs[@]}" LipoExecutable "${executable}" "$@"
} }
ThinAppFrameworks() { ThinAppFrameworks() {
......
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