build: build produces a broken object file for iOS

This gets `zig build -Dtarget=aarch64-ios` working. By "working" I mean
it produces an object file without compiler errors. However, the object
file certainly isn't useful since it uses a number of features that will
not work in the iOS sandbox.

This is just an experiment more than anything to see how hard it would be to
get libghostty working within iOS to render a terminal. Note iOS doesn't
support ptys so this wouldn't be a true on-device terminal. The
challenge right now is to just get a terminal rendering (not usable).
This commit is contained in:
Mitchell Hashimoto
2024-01-13 20:21:49 -08:00
parent 7a4c63522b
commit 3360a008cd
29 changed files with 228 additions and 46 deletions

View File

@@ -290,7 +290,7 @@ fn setupFd(src: File.Handle, target: i32) !void {
}
}
},
.macos => {
.ios, .macos => {
// Mac doesn't support dup3 so we use dup2. We purposely clear
// CLO_ON_EXEC for this fd.
const flags = try os.fcntl(src, os.F.GETFD, 0);