Skip to content

fix(aaron): workaround compiler-rt 18 darwin build via overlay#147

Merged
etrobert merged 1 commit into
mainfrom
etienne/aaron-compiler-rt-overlay
May 29, 2026
Merged

fix(aaron): workaround compiler-rt 18 darwin build via overlay#147
etrobert merged 1 commit into
mainfrom
etienne/aaron-compiler-rt-overlay

Conversation

@etrobert-bot

Copy link
Copy Markdown
Collaborator

Summary

  • nixos-unstable has been stuck at 64c08a7 (2026-05-23) for almost a week because Apple SDK 26.4 ships libc++ 21, which dropped fallbacks for __builtin_ctzg / __builtin_clzg — builtins Clang 18 does not recognize. This breaks compiler-rt-libc-18.1.8 on Darwin and blocks all our nixos-unstable updates (chore: update flake inputs #141 has been failing aaron since 2026-05-23).
  • Mirror the upstream fix from NixOS/nixpkgs#523142 as a host-scoped overlay on aaron, disabling the C++ components (XRAY, LIBFUZZER, MEMPROF, ORC) of compiler-rt 18 via overrideScope so the fix propagates into the darwin stdenv bootstrap.
  • Comment in the source documents the workaround and points to upstream so we can remove this once #523142 (or its replacement) lands in nixos-unstable.

Tracking: NixOS/nixpkgs#480849, NixOS/nixpkgs#523142.

Test plan

  • nix flake check --no-build passes (statix, deadnix, all configurations evaluate)
  • nix build .#darwinConfigurations.aaron.system succeeds locally on aaron — the previously-failing compiler-rt-libc-18.1.8 derivation now builds, and clang-wrapper-18.1.8 / stdenv-darwin / full system path all complete
  • CI green on all four hosts (aaron, tower, leod, pi)
  • darwin-rebuild switch on aaron once merged

Apple SDK 26.4 ships libc++ 21, which dropped the fallbacks for
__builtin_ctzg/__builtin_clzg — builtins Clang 18 does not recognize.
nixos-unstable has been stuck at 64c08a7 (2026-05-23) ever since,
because Hydra cannot advance past this failure.

Mirror NixOS/nixpkgs#523142 with a host-scoped overlay that disables
the C++ components (XRAY, LIBFUZZER, MEMPROF, ORC) of compiler-rt 18.
Built locally on aarch64-darwin; the overlay propagates through the
stdenv-darwin bootstrap via overrideScope.

Refs: NixOS/nixpkgs#480849, NixOS/nixpkgs#523142
@etrobert etrobert force-pushed the etienne/aaron-compiler-rt-overlay branch from a741648 to 44a9c14 Compare May 29, 2026 10:53
@etrobert etrobert enabled auto-merge (squash) May 29, 2026 10:57
@etrobert etrobert merged commit ea7192f into main May 29, 2026
5 checks passed
@etrobert etrobert deleted the etienne/aaron-compiler-rt-overlay branch May 29, 2026 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants