Skip to content

apple-sdk_27: init at 27.0 - #564039

Merged
reckenrode merged 4 commits into
NixOS:stagingfrom
sempiternal-aurora:macos-27-sdk
Sep 18, 2026
Merged

reckenrode merged 4 commits into
NixOS:stagingfrom
sempiternal-aurora:macos-27-sdk

Conversation

@sempiternal-aurora

Copy link
Copy Markdown
Contributor

Another year, another macOS SDK, this time for macOS 27. Follows along in a similar vein to #454747 and #347862, but with a few main differences:

  • This year, the way to test whether the sdk compiled was with dup3, for some reason only added post macOS 27
  • Apple added a new cpu subtype, arm64e.x1, which requires a back port of the initialisation code to old llvm versions so that we can actually package the sdk
    • So far, linking against it hasn't required changing ld64 to support it, and I don't want to do it, so I'm leaving it as it is, and if in future some problem arises where the linker needs to know about arm64e.x1, then use lld.
    • Sadly, this does mean we need to target staging, as we're rebuilding the Darwin stdenv
  • It seems that apple has finally settled on a url for the catalog, replacing 27 or 26 with 17 or 16 in any combination in the link here fails to give a catalog: https://swscan.apple.com/content/catalogs/others/index-27-26-15-14-13-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz
  • Without the need to also bump the source releases at the same time, this can come out a month earlier
  • I changed the way that the sdks are instantiated in the top-level, this trades off having them built with an earlier compiler in the bootstrap stage for removing callPackages into the by-name directory.

Overall, this was a very straightforward process, only made slightly annoying by the fact that I need to rebuild the stdenv. Don't really have much other comments.

Draft for now as I haven't tested on a pre macOS 27 machine to see what the linking test does.

Things done

Comment thread pkgs/top-level/all-packages.nix
@nixpkgs-ci nixpkgs-ci Bot added 8.has: package (new) This PR adds a new package 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 10.rebuild-nixos-tests This PR causes rebuilds for all NixOS tests and should normally target the staging branches. 6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related 8.has: documentation This PR adds or changes documentation labels Sep 16, 2026
@sempiternal-aurora
sempiternal-aurora force-pushed the macos-27-sdk branch 2 times, most recently from 181a322 to 459d56e Compare September 17, 2026 06:06
@sempiternal-aurora

Copy link
Copy Markdown
Contributor Author

Output on macOS 15 of apple-sdk_27-test:

:(

Output of the same test, with (darwinMinVersionHook "27.0") added to the build inputs:

dyld[73571]: Symbol not found: _dup3
  Referenced from: <ED5AEE15-C1FE-3ED1-B51F-21271D8CDAE1> /nix/store/inj6hls68id58ib8abkr4llfv693lc0p-apple-sdk_27-test/bin/apple-sdk_27-test (built for macOS 27.0 which is newer than running OS)
  Expected in:     <9500400E-A2EC-33F9-B76B-9830E022777A> /usr/lib/libSystem.B.dylib
zsh: abort      result/bin/apple-sdk_27-test

@sempiternal-aurora
sempiternal-aurora marked this pull request as ready for review September 17, 2026 16:51
@nixpkgs-ci
nixpkgs-ci Bot requested review from a team, DimitarNestorov, adevress, fpletz, kashw2, me-and, philiptaron, ruuda, thiagokokada, thoughtpolice, wmertens and zivarah and removed request for a team September 17, 2026 16:53
@nixpkgs-ci
nixpkgs-ci Bot requested review from a team and pyrox0 September 17, 2026 16:53
Apple added a new CPU subtype with the macOS 27 sdk, which describes
CPUs with extra pointer authentication features. The apple A20 and M6
chips have this subtype, and code in the new macOS 27 sdk needs the
compiler toolchain to be able to handle these architectures, so that it
can be linked against.
A nice to do clean-up that brings things into a style I've done before.
Does cause the sdks to be built with an earlier stage, but otherwise
doesn't seem to cause any breakages.

@reckenrode reckenrode left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this update, especially the LLVM patches! I expect the LLVM needed by Swift 6.3 will also need its own patch, but I’ll take care of that in the Swift 6.3 PR.

@reckenrode
reckenrode added this pull request to the merge queue Sep 18, 2026
@nixpkgs-ci nixpkgs-ci Bot added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Sep 18, 2026
Merged via the queue into NixOS:staging with commit 5e98dfe Sep 18, 2026
29 checks passed
@sempiternal-aurora
sempiternal-aurora deleted the macos-27-sdk branch September 18, 2026 15:03
anund added a commit to anund/nixpkgs that referenced this pull request Sep 26, 2026
PR NixOS#564039 introduced support for arm64e_x1 in base llvm. The support
required changes introduced in 22.1.0 not otherwise present in amd fork
of llvm based on 22.0.0. Backport additional patches to get allow the
patch to cleanly apply.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related 8.has: documentation This PR adds or changes documentation 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 10.rebuild-nixos-tests This PR causes rebuilds for all NixOS tests and should normally target the staging branches. 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

Status: ✅ Done
Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants