Skip to content

Commit

Permalink
Fix syntax of test in chip_xcode_build_connector.sh. (project-chip#24313
Browse files Browse the repository at this point in the history
)

There was a stray ']' that was being treated as part of the string, so we never
set target_arch or target_cpu.

Fixing that ended up with us setting target_arch/cpu to arm64 if it came before
x84_64 in ARCHS, which breaks CI.  So make sure we use the host arch as the
target_arch if it's in ARCHS at all.
  • Loading branch information
bzbarsky-apple authored Jan 9, 2023
1 parent 9dee723 commit 6be2d43
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/darwin/Framework/chip_xcode_build_connector.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,11 @@ target_defines=[${target_defines:1}]
declare target_arch=
declare target_cpu=
declare target_cflags=
declare current_arch="$(uname -m)"

read -r -a archs <<<"$ARCHS"
for arch in "${archs[@]}"; do
if [ -z "$target_arch"] ]; then
if [ -z "$target_arch" ] || [ "$arch" = "$current_arch" ]; then
target_arch="$arch"
case "$arch" in
x86_64) target_cpu="x64" ;;
Expand Down

0 comments on commit 6be2d43

Please sign in to comment.