Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions scripts/build-app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@ app="build/Right Folder.app"
binaries=()
for arch in arm64 x86_64; do
triple="$arch-apple-macosx14.0"
swift build -c release --product RightFolder --triple "$triple"
bin="$(swift build -c release --triple "$triple" --show-bin-path)"
# Swift 6.4's default scratch layout is triple-independent (out/Products/Release), so with a
# shared scratch both triples report the same bin path and the x86_64 build overwrites the
# arm64 one before lipo. Give each arch its own scratch; triple-keyed layouts work the same.
scratch=".build/$arch-scratch"
swift build -c release --product RightFolder --triple "$triple" --scratch-path "$scratch"
bin="$(swift build -c release --triple "$triple" --scratch-path "$scratch" --show-bin-path)"
binaries+=("$bin/RightFolder")
done

Expand Down