Skip to content

Commit a91d14f

Browse files
committed
Set arch based on platform
1 parent 8f39570 commit a91d14f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

scripts/build.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,13 @@ database_emulator="${scripts_dir}/run_database_emulator.sh"
9393
system=$(uname -s)
9494
case "$system" in
9595
Darwin)
96+
architecture=$(uname -m)
9697
xcode_version=$(xcodebuild -version | grep Xcode)
9798
xcode_version="${xcode_version/Xcode /}"
9899
xcode_major="${xcode_version/.*/}"
99100
;;
100101
*)
102+
architecture="x86_64"
101103
xcode_major="0"
102104
;;
103105
esac
@@ -179,7 +181,7 @@ ipad_flags=(
179181
)
180182

181183
macos_flags=(
182-
-destination 'platform=OS X,arch=x86_64'
184+
-destination "platform=OS X,arch=$architecture"
183185
)
184186
tvos_flags=(
185187
-destination 'platform=tvOS Simulator,name=Apple TV'
@@ -191,8 +193,8 @@ visionos_flags=(
191193
-destination 'platform=visionOS Simulator,OS=2.5,name=Apple Vision Pro'
192194
)
193195
catalyst_flags=(
194-
ARCHS=x86_64 VALID_ARCHS=x86_64 SUPPORTS_MACCATALYST=YES
195-
-destination platform="macOS,variant=Mac Catalyst,arch=x86_64" TARGETED_DEVICE_FAMILY=2
196+
ARCHS=$architecture VALID_ARCHS=$architecture SUPPORTS_MACCATALYST=YES
197+
-destination platform="macOS,variant=Mac Catalyst,arch=$architecture" TARGETED_DEVICE_FAMILY=2
196198
CODE_SIGN_IDENTITY=- CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
197199
)
198200

0 commit comments

Comments
 (0)