Closed slimsag closed 2 years ago
I am working on a PR to port this from clang's compiler-rt implementation, with hope of it landing in the next Zig release (but I totally understand if that's not possible!)
Slotted for 0.11.0 milestone but if you get a PR up soon I will be sure to review it in time for it to land into 0.9.0.
Sent #10232
Zig Version
0.9.0-dev.1713+07cc51e04
Steps to Reproduce
(Apologies for not having a minimal reproduction ready, I will update the issue to include one very soon.)
When using Zig to compile any Objective-C code which includes an
@available
check, as many serious Objective-C codebases do, such as Google's Dawn WebGPU implementation, clang will emit calls to___isPlatformVersionAtLeast
and__isOSVersionAtLeast
which, as of Oct 2020, are expected to be provided by compiler-rt: https://reviews.llvm.org/D90367Zig's compiler-rt port however is not up-to-date with this change (see also #1504) and so it results in undefined references when attempting to cross-compile such code:
Expected Behavior
compiler-rt includes
___isPlatformVersionAtLeast
and__isOSVersionAtLeast
definitions so Objective-C code using@available
OS version checks links successfully.Actual Behavior
Missing symbols