Fix ARC workspace inheritance crash and native Zig helper builds (#2283)
* Fix ARC workspace inheritance crash and native Zig helper builds * Fix Nightly Cmd+N workspace creation crash * Restore safe terminal config snapshots for Intel Nightly
This commit is contained in:
parent
f0c3ccc314
commit
c4bc18d906
6 changed files with 265 additions and 213 deletions
|
|
@ -78,6 +78,16 @@ if [[ -n "$TARGET_TRIPLE" ]]; then
|
|||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# When the requested target matches zig's native output arch, drop -Dtarget
|
||||
# so zig uses native compilation. This avoids cross-linker issues on newer
|
||||
# SDKs (e.g., macOS Tahoe + zig 0.15.x). Note: zig may run under Rosetta,
|
||||
# so we detect native output arch from the zig binary itself, not uname -m.
|
||||
ZIG_ARCH="$(file "$(command -v zig)" 2>/dev/null | grep -oE '(arm64|x86_64)' | head -1)"
|
||||
case "$TARGET_TRIPLE" in
|
||||
aarch64-macos) [[ "$ZIG_ARCH" == "arm64" ]] && TARGET_TRIPLE="" ;;
|
||||
x86_64-macos) [[ "$ZIG_ARCH" == "x86_64" ]] && TARGET_TRIPLE="" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if ! command -v zig >/dev/null 2>&1; then
|
||||
|
|
@ -122,8 +132,18 @@ mkdir -p "$(dirname "$OUTPUT_PATH")"
|
|||
if [[ "$UNIVERSAL" == "true" ]]; then
|
||||
ARM64_PREFIX="$TMP_DIR/arm64"
|
||||
X86_PREFIX="$TMP_DIR/x86_64"
|
||||
build_helper "$ARM64_PREFIX" "aarch64-macos"
|
||||
build_helper "$X86_PREFIX" "x86_64-macos"
|
||||
ZIG_ARCH="$(file "$(command -v zig)" 2>/dev/null | grep -oE '(arm64|x86_64)' | head -1)"
|
||||
# Use native compilation for the matching arch to avoid cross-linker issues
|
||||
if [[ "$ZIG_ARCH" == "arm64" ]]; then
|
||||
build_helper "$ARM64_PREFIX" ""
|
||||
build_helper "$X86_PREFIX" "x86_64-macos"
|
||||
elif [[ "$ZIG_ARCH" == "x86_64" ]]; then
|
||||
build_helper "$ARM64_PREFIX" "aarch64-macos"
|
||||
build_helper "$X86_PREFIX" ""
|
||||
else
|
||||
build_helper "$ARM64_PREFIX" "aarch64-macos"
|
||||
build_helper "$X86_PREFIX" "x86_64-macos"
|
||||
fi
|
||||
/usr/bin/lipo -create \
|
||||
"$ARM64_PREFIX/bin/ghostty" \
|
||||
"$X86_PREFIX/bin/ghostty" \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue