Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Scripts/build-and-sign.sh
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ fi

echo "🏗️ Building KeyPath and plugins..."
# Build all products in a single SwiftPM invocation to share module compilation.
swift build --configuration release -Xswiftc -no-whole-module-optimization
swift build ${KEYPATH_BUILD_SYSTEM:+--build-system "$KEYPATH_BUILD_SYSTEM"} --configuration release -Xswiftc -no-whole-module-optimization

echo "📦 Creating app bundle..."
APP_NAME="KeyPath"
Expand Down
2 changes: 1 addition & 1 deletion Scripts/build-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if [ ! -f "$HELPER_INFO_PLIST" ]; then
exit 1
fi

swift build --configuration release --product "$HELPER_NAME" \
swift build ${KEYPATH_BUILD_SYSTEM:+--build-system "$KEYPATH_BUILD_SYSTEM"} --configuration release --product "$HELPER_NAME" \
-Xswiftc -no-whole-module-optimization \
-Xlinker -sectcreate -Xlinker __TEXT -Xlinker __info_plist -Xlinker "$HELPER_INFO_PLIST"

Expand Down
10 changes: 8 additions & 2 deletions Scripts/quick-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -254,15 +254,21 @@ fi
echo "🔨 Building..."
BUILD_LOG="$BUILD_LOG_DIR/build-${BUILD_ID}.log"
write_build_log_header "$BUILD_LOG"
if ! swift build "${MODULE_CACHE_FLAGS[@]}" >> "$BUILD_LOG" 2>&1; then
# Optional build-system override (e.g. KEYPATH_BUILD_SYSTEM=native on toolchains
# whose default swiftbuild system is broken). Unset = use the toolchain default.
BUILD_SYSTEM_FLAGS=()
if [[ -n "${KEYPATH_BUILD_SYSTEM:-}" ]]; then
BUILD_SYSTEM_FLAGS=(--build-system "$KEYPATH_BUILD_SYSTEM")
fi
if ! swift build "${BUILD_SYSTEM_FLAGS[@]}" "${MODULE_CACHE_FLAGS[@]}" >> "$BUILD_LOG" 2>&1; then
BUILD_END_MS=$(get_time_ms)
DURATION=$((BUILD_END_MS - BUILD_START_MS))
print_build_failure_diagnostics "$BUILD_LOG"
log_build_event "BUILD_FAILED" "$DURATION"
exit 1
fi

if ! BIN_DIR_OUTPUT=$(swift build --show-bin-path "${MODULE_CACHE_FLAGS[@]}" 2>> "$BUILD_LOG"); then
if ! BIN_DIR_OUTPUT=$(swift build --show-bin-path "${BUILD_SYSTEM_FLAGS[@]}" "${MODULE_CACHE_FLAGS[@]}" 2>> "$BUILD_LOG"); then
BUILD_END_MS=$(get_time_ms)
DURATION=$((BUILD_END_MS - BUILD_START_MS))
print_build_failure_diagnostics "$BUILD_LOG"
Expand Down
Loading