Skip to content

llvmPackages.libllvm: disable getMacOSHostVersion on LLVM < 21#478778

Merged
vcunat merged 2 commits intoNixOS:stagingfrom
emilazy:push-tottqyktrtmn
Jan 11, 2026
Merged

llvmPackages.libllvm: disable getMacOSHostVersion on LLVM < 21#478778
vcunat merged 2 commits intoNixOS:stagingfrom
emilazy:push-tottqyktrtmn

Conversation

@emilazy
Copy link
Member

@emilazy emilazy commented Jan 10, 2026

Currently untested. See commit messages.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@emilazy emilazy requested review from a team and vcunat January 10, 2026 18:20
@emilazy emilazy added the backport release-25.11 Backport PR automatically label Jan 10, 2026
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related labels Jan 10, 2026
This is breaking Hydra builds. The old comment about the CoreFoundation
framework is no longer relevant now that we always use the system
frameworks.
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. and removed 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. labels Jan 10, 2026
@emilazy
Copy link
Member Author

emilazy commented Jan 10, 2026

I guess this can go to staging for unstable, as the packages were already built prior to the builder OS upgrade.

@emilazy emilazy changed the base branch from master to staging January 10, 2026 18:45
@nixpkgs-ci nixpkgs-ci bot closed this Jan 10, 2026
@nixpkgs-ci nixpkgs-ci bot reopened this Jan 10, 2026
@emilazy
Copy link
Member Author

emilazy commented Jan 10, 2026

Diff of llvm_18 on aarch64-darwin:

- /nix/store/3dq3yd8nwdki4afhrpayhh9rknpfd4j1-llvm-18.1.8.drv:{out}
+ /nix/store/n83i0zsdh343xbf1954ndzcn8c9chf6y-llvm-18.1.8.drv:{out}
• The environments do not match:
    postPatch=''
      substituteInPlace cmake/modules/AddLLVM.cmake \
        --replace-fail 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)"
      rm test/MC/ELF/cfi-version.ll
    
      substituteInPlace unittests/TargetParser/Host.cpp \
        --replace-fail '/usr/bin/sw_vers' "/nix/store/9h1l6sxvvcrbdh44lgfg48dn52lp2vv4-DarwinTools-1/bin/sw_vers"
      substituteInPlace test/ExecutionEngine/Interpreter/intrinsics.ll \
        --replace-fail "%roundeven32 = call float @llvm.roundeven.f32(float 0.000000e+00)" "" \
        --replace-fail "%roundeven64 = call double @llvm.roundeven.f64(double 0.000000e+00)" ""
      substituteInPlace unittests/Support/VirtualFileSystemTest.cpp \
        --replace-fail "PhysicalFileSystemWorkingDirFailure" "DISABLED_PhysicalFileSystemWorkingDirFailure"
    + substituteInPlace unittests/TargetParser/Host.cpp \
    +   --replace-fail "getMacOSHostVersion" "DISABLED_getMacOSHostVersion"
      substituteInPlace unittests/Support/CMakeLists.txt \
        --replace-fail "Path.cpp" ""
      rm unittests/Support/Path.cpp
      substituteInPlace unittests/IR/CMakeLists.txt \
        --replace-fail "PassBuilderCallbacksTest.cpp" ""
      rm unittests/IR/PassBuilderCallbacksTest.cpp
      rm test/tools/llvm-objcopy/ELF/mirror-permissions-unix.test
      rm test/tools/llvm-objcopy/ELF/strip-preserve-atime.test
      patchShebangs test/BugPoint/compile-custom.ll.py
''

I don’t really feel like running an entire LLVM build to validate; it’s the same method we’re already using to disable the test on x86_64-darwin. This should be good to go.

@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 Jan 10, 2026
@rrbutani
Copy link
Contributor

(@emilazy thanks for updating the comments, I'd missed that x86_64 darwin uses CoreFoundation from the system now)

lib.versionOlder release_version "21"
||
# Rebuild avoidance; TODO: clean up on `staging`.
stdenv.hostPlatform.isx86
Copy link
Member

Choose a reason for hiding this comment

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

But this is staging!

Copy link
Member

Choose a reason for hiding this comment

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

Maybe that's for easier auto-backport label?

Copy link
Member Author

Choose a reason for hiding this comment

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

I will clean up on staging and backport to staging-25.11. This is getting backported to a release branch.

@vcunat
Copy link
Member

vcunat commented Jan 11, 2026

Let's get Hydra start working (on this on 25.11).

@vcunat vcunat added this pull request to the merge queue Jan 11, 2026
Merged via the queue into NixOS:staging with commit 7102b81 Jan 11, 2026
60 of 62 checks passed
@nixpkgs-ci
Copy link
Contributor

nixpkgs-ci bot commented Jan 11, 2026

Successfully created backport PR for release-25.11:

@github-actions github-actions bot added the 8.has: port to stable This PR already has a backport to the stable release. label Jan 11, 2026
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: port to stable This PR already has a backport to the stable release. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 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. backport release-25.11 Backport PR automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants