llvmPackages_18.compiler-rt: fix Darwin build#523142
Conversation
Assisted-by: Claude:opus-4.7
ce390ac to
db55912
Compare
|
|
Given that libc++ 21 doesn't support Clang 18, won't we still expect LLVM 18 to be broken at least for things involving C++ after this? (TBH LLVM 18 is overdue for removal and should be dropped. I'd be okay with just marking it broken on Darwin.) |
Yeah I would assume so.
Makes sense to me. Just to clarify, it sounds like you're saying we still want to keep LLVM 18 for the 26.05 release? |
|
Right, dropping is not on the cards since we’re post‐branch‐off. But we could mark it broken on Darwin for 26.05 and drop it for 26.11; thankfully there’s little left using it. |
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
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 Co-authored-by: Etienne Robert <etiennerobert33@gmail.com>
…ld failure nixpkgs unstable 64c08a7 ships libcxx 21 + apple-sdk 26.4 which uses __builtin_ctzg (Clang 19+ only). bitwarden-desktop pulls compiler-rt 18 that doesn't know the builtin -> build fails. Switch macOS to homebrew cask (same pattern as vivaldi/virtualbox). Linux keeps pkgs.bitwarden-desktop unchanged. Tracking: NixOS/nixpkgs#523142
|
Built successfully on Disclosure: build verification performed with an AI agent (Claude Code, claude-opus-4-8) on x86_64-darwin; results reviewed by me. |
|
What work remains on getting this merged? Is there any help needed? As referenced in the linked issue above, |
|
I found that using the current version from No backport to 26.05 as of yet. |
ZHF: #516381
This PR fixes the Darwin build for
llvmPackages_18.compiler-rtafter it was broken by the Apple SDK update #511399 via the staging-next merge #517946. Specifically, llvm/llvm-project#133920 broke the ability to build Clang 18 with libc++ 21, so we addlib.versions.major release_version == "18" && stdenv.hostPlatform.isDarwinto the set of conditions to disable things that require libc++.Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.