| 24 Oct 2025 |
Randy Eckenrode | The iOS/etc stuff isn’t expected to match due to the way filtering is done. Building source releases for iOS isn’t intended to work. The only thing I really find surprising is that the 14.4 SDK has a __MAC_OS_X_VERSION_MAX_ALLOWED of 14.3 not 14.4. | 01:20:28 |
emily | for internal SDK purposes I think #define __SPI_AVAILABLE(...) API_AVAILABLE(__VA_ARGS__) and the same for the other macros are a complete implementation of AvailabilityInternalPrivate.h that doesn't have the weird divergences from the public SDK availability header stuff, but if you don't like just touch "$out/include/AvailabilityInternalPrivate.h" or dropping the include I'm okay with merging it as-is as long as the broken shebang is fixed | 01:20:31 |
Randy Eckenrode | The broken shebang should be fixed. | 01:20:47 |
Randy Eckenrode | I would like to avoid hacking up the private headers stuff any more than I already do. Ideally, we would have functioning availability checks for SPIs. That’s going to be particularly useful for if/when we have only one SDK. | 01:22:05 |
emily | other way around: the SDK has 14.4 | 01:23:52 |
emily | but darwin.AvailabilityVersions only generates for 14.3 | 01:23:59 |
emily | the include of AvailabilityInternalPrivate.h seems like a non-trivial difference, and relevantly they differ in terms of handling of the __SPI_AVAILABLE stuff…
darwin.AvailabilityVersions also creates an AvailabilityMacros.h that doesn't pull in TargetConditionals.h, while the SDK one does
| 01:24:06 |
Randy Eckenrode | adv_cmds gets rid of colldef. That’s not helpful. | 01:24:21 |
emily | anyway, like I said we can have functioning availability checks just by forwarding to the non-private ones (that's what the generated headers do in effect) | 01:24:26 |
Randy Eckenrode | Ah. That could be a bug in my script changes. | 01:24:33 |
emily | without shadowing all the other availability header stuff from the SDK | 01:24:36 |
emily | this is on nixpkgs-unstable, I could check your PR though | 01:24:47 |
emily | I'm just saying there are a fair few differences | 01:24:57 |
emily | AFAICT, the __SPI_AVAILABLE stuff is just identical to __API_AVAILABLE for internal stuff and defined away for external stuff | 01:25:44 |
emily | not sure why they do it in such a convoluted way given that but I guess it's what their scripts make convenient | 01:25:58 |
emily | also not sure why they define away the availability for internal stuff | 01:26:17 |
emily | * also not sure why they define away the availability for external stuff | 01:26:19 |
emily | not like it hides the definitions | 01:26:23 |
Randy Eckenrode | https://github.com/freebsd/freebsd-src/commit/c844ab67178719d956f1571f70bae84edc49cf72 | 01:29:08 |
Randy Eckenrode | I guess Apple is catching up changes from FreeBSD 11 …. | 01:29:15 |
emily | oh. I think I understand why SPI_AVAILABLE is defined away for public users | 01:33:41 |
emily | it seems like it's used to annotate things defined in the source releases, not system stuff | 01:34:46 |
emily | so __SPI_AVAILABLE(macos(15.0), …) just means "this wasn't in dyld before macOS 15.0", I guess (why that's useful I don't know) | 01:35:18 |
emily | when we're building the source releases ourselves it seems the public SDK behaviour of eliding those availability checks is exactly the correct thing | 01:35:48 |
emily | https://github.com/search?q=repo%3Aapple-oss-distributions%2Flibdispatch%20dispatch_time_from_nsec&type=code another example | 01:36:15 |
emily | so… all the darwin.AvailabilityVersions version of it would do is incorrectly mark stuff we're building as unavailable depending on SDK version, essentially | 01:37:10 |
Randy Eckenrode | It probably depends on whether we’re linking to the implementation in one of the source releases or to the symbol exported by the system in the SDK. | 01:37:19 |
emily | right | 01:37:28 |
emily | but I think this stuff is mostly not exported by the SDK? | 01:37:36 |
emily | because it's all stuff in private headers | 01:37:40 |