-
Notifications
You must be signed in to change notification settings - Fork 0
Home
This is fork of zig aims to maintain minimal changes such that zig still works on (and can target) macOS 10.13 and higher, because a large fraction of Intel-based Macs cannot be upgraded to the macOS version required by the official binaries.
The zig sources still have all the code that supports older macOS versions, so for the most part the reasons for the default build to not work are just lack of testing and upstream changes in LLVM. Those are minimal and so far easily addressed for zig itself.
The main issue so far was the incorrect assumptions about the version availability API. The "fix" in zig was to remove it, but that breaks any compiled code that contains @availability(macOS...) constructs. 8e502a adds a more reliable implementation based on the kernel version which is only used for targets before macOS 11.
The bigger obstacle is the catch 22 caused by the fact that the bootstrap is broken. The main problem is the building of the zig2 stage which doesn't work for two reasons: firstly, the cmake build doesn't allow for the specification of the target version into zig, so it builds the wrong target, but even if that is fixed the resulting binary just segfaults. So currently the easiest way to work around the problem is to either cross-compile the stage3 zig compiler (both cross-compiling on Linux and on macOS 14 worked) or to use one of the binaries from this site to avoid the bootstrap.