diff --git a/src/darwin/Framework/chip_xcode_build_connector.sh b/src/darwin/Framework/chip_xcode_build_connector.sh index ab94517c93f2f8..5d8459b835681b 100755 --- a/src/darwin/Framework/chip_xcode_build_connector.sh +++ b/src/darwin/Framework/chip_xcode_build_connector.sh @@ -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" ;;