Repository navigation
gterm: build the ghostty engine under Xcode 27 - #46
Merged
Merged
Conversation
The macOS 27 SDK's math.h defers INFINITY/NAN to the compiler's float.h via clang's __need_infinity_nan protocol (LLVM PR #164348, LLVM 22 and Apple clang 21). Zig 0.15 bundles LLVM 20 headers, so its libc++ sub-compilation failed with "use of undeclared identifier 'INFINITY'" in __random/clamp_to_integral.h and the xcframework build stopped. Add patch_zig_float_h to build-ghostty-xcframework.sh: it idempotently implements the protocol in zig's bundled float.h (backup kept as float.h.orig) before compiling, mirroring the existing libxev patch. No-op on older SDKs and when zig already handles it. Claude-Session: https://claude.ai/code/session_011AGnzfZpK9Jvx13DcS97DZ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
After upgrading to macOS 27.0 / Xcode 27.0 (27A266a),
scripts/build-ghostty-xcframework.shfailed:The macOS 27 SDK's
math.hnow defersINFINITY/NANto the compiler'sfloat.hthrough clang's__need_infinity_nanprotocol (LLVM PR #164348; LLVM 22 and Apple clang 21). Zig 0.15 ships LLVM 20 headers without it, so building zig's bundled libc++ against the new SDK breaks.patch_zig_float_hto the engine build script: idempotently implements the protocol in zig's bundledfloat.h(backup kept asfloat.h.orig), in the same style as the existing libxev patch. No-op on older SDKs or once zig carries the fix.Verification (Xcode 27.0, iOS 27.0 SDK and runtime)
./scripts/build-ghostty-xcframework.shproduces all three slices.gtermTests: 107 tests, 0 failures.scripts/test-ipad-ui.py(iPad Pro 11-inch M5, iOS 27.0): 3 passed.scripts/test-ipad-ui.py --device-type "iPhone 17 Pro Max"(iOS 27.0): 2 passed.Not covered: the iPhone Duo simulator. It ships only with Xcode 27.1, which Apple has not released yet (the releases feed lists Xcode 27 27A266a as newest, and
simctlhas no Duo device type).https://claude.ai/code/session_011AGnzfZpK9Jvx13DcS97DZ