mirror of
https://github.com/cirruslabs/tart.git
synced 2026-09-29 18:51:19 +02:00
* Bundle Swift compatibility libraries in Tart releases * fix(release): weak-link Swift compatibility library * fix(release): weak-link from Xcode 27 library path
28 lines
653 B
Bash
Executable File
28 lines
653 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -eu
|
|
|
|
ARCH="$1"
|
|
SCRATCH_PATH=".build/$ARCH"
|
|
OUTPUT_PATH=".build/prebuilt/$ARCH"
|
|
SWIFT_COMPATIBILITY_LIBRARY="$(dirname "$(xcrun --find swiftc)")/../lib/swift-6.2/macosx/libswiftCompatibilitySpan.dylib"
|
|
|
|
swift build \
|
|
--build-system swiftbuild \
|
|
--scratch-path "$SCRATCH_PATH" \
|
|
--arch "$ARCH" \
|
|
--configuration release \
|
|
-Xlinker -weak_library \
|
|
-Xlinker "$SWIFT_COMPATIBILITY_LIBRARY" \
|
|
--product tart
|
|
|
|
BIN_PATH=$(swift build \
|
|
--build-system swiftbuild \
|
|
--scratch-path "$SCRATCH_PATH" \
|
|
--arch "$ARCH" \
|
|
--configuration release \
|
|
--show-bin-path)
|
|
|
|
mkdir -p "$OUTPUT_PATH"
|
|
cp "$BIN_PATH/tart" "$OUTPUT_PATH/tart"
|