Skip to content

llvmPackages: llvmPackages_19 -> llvmPackages_21#407738

Merged
emilazy merged 4 commits intoNixOS:stagingfrom
RossComputerGuy:feat/llvm-bump
Sep 16, 2025
Merged

llvmPackages: llvmPackages_19 -> llvmPackages_21#407738
emilazy merged 4 commits intoNixOS:stagingfrom
RossComputerGuy:feat/llvm-bump

Conversation

@RossComputerGuy
Copy link
Member

@RossComputerGuy RossComputerGuy commented May 16, 2025

Things done

Bump the global LLVM version. Tested builds:

  • firefox

  • mesa

  • rustc

  • Built on platform(s)

    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:

  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage

  • Tested basic functionality of all binary files (usually in ./result/bin/)

  • Nixpkgs 25.11 Release Notes (or backporting 24.11 and 25.05 Nixpkgs Release notes)

    • (Package updates) Added a release notes entry if the change is major or breaking
  • NixOS 25.11 Release Notes (or backporting 24.11 and 25.05 NixOS Release notes)

    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.


Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin 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-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. labels May 16, 2025
@github-actions github-actions bot added the 8.has: documentation This PR adds or changes documentation label May 16, 2025
@github-actions github-actions bot added 6.topic: rust General-purpose programming language emphasizing performance, type safety, and concurrency. 6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related labels May 17, 2025
@RossComputerGuy RossComputerGuy changed the title pkgs/top-level/all-packages.nix: use LLVM 20 for treewide LLVM llvmPackages: llvmPackages_19 -> llvmPackages_20 May 17, 2025
@RossComputerGuy RossComputerGuy marked this pull request as ready for review May 22, 2025 16:48
Copy link
Member

@winterqt winterqt left a comment

Choose a reason for hiding this comment

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

Please fix eval. Someone else broke it, disregard.

@winterqt winterqt self-requested a review May 22, 2025 17:58
@RossComputerGuy
Copy link
Member Author

error: Alias nltk-data is still in all-packages.nix

I have no idea why this is happening and I don't think it's related to anything I changed. It worked before I rebased to resolve conflicts.

@winterqt
Copy link
Member

winterqt commented May 22, 2025

Indeed — have retriggered a test merge and eval. If that doesn’t fix it I’ll go fix it myself, I just imagine it was fixed by now.

Fixed in #409843.

@nix-owners nix-owners bot requested review from edolstra and fpletz May 22, 2025 19:45
@RossComputerGuy RossComputerGuy force-pushed the feat/llvm-bump branch 2 times, most recently from 7eba173 to 1b44f52 Compare August 24, 2025 03:55
@nixpkgs-ci nixpkgs-ci bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Aug 24, 2025
@kilyanni
Copy link
Contributor

kilyanni commented Aug 25, 2025

For llvmPackages_21.libclc, I believe the gnu-install-dirs patch should be updated as the header install was removed: llvm/llvm-project@a2b0576.

With this commit applied on top of this branch it builds properly (with SPIRV manually updated to nightly to fix broken spirv-llvm-translator)

Resolved in #436446

@nixpkgs-ci nixpkgs-ci bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Aug 25, 2025
@RossComputerGuy RossComputerGuy force-pushed the feat/llvm-bump branch 2 times, most recently from 8435796 to 542c28d Compare September 1, 2025 02:31
@nixpkgs-ci nixpkgs-ci bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Sep 1, 2025
Comment on lines 5636 to 5637
Copy link
Member

Choose a reason for hiding this comment

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

These should presumably be dropped?

Copy link
Member Author

Choose a reason for hiding this comment

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

Why?

Copy link
Member

Choose a reason for hiding this comment

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

Because it wasn’t there in the previous version, and it pins an old version of LLVM, and the commit description is “rust: track latest LLVM to simplify version bumps”?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's because rust has been using LLVM 20, does it support 21?

Copy link
Member

Choose a reason for hiding this comment

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

I’m confused – if your intent wasn’t to have Rust track the latest LLVM for LLVM 21, then why did you make a commit with the title “rust: track latest LLVM to simplify version bumps” that made Rust track the latest LLVM, in the LLVM 21 bump PR?

These pins appeared at some point during a rebase. I believe Rust always supports the latest LLVM, but if we want to keep Rust pinned to LLVM 20 then we shouldn’t have a commit talking about unpinning it in an LLVM 21 bump PR that doesn’t unpin it. What makes sense to me is dropping the pins here to accomplish the goal of the commit message, but I might be misunderstanding what the intent of the commit was?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because that commit was made when this was doing LLVM 20 at first.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, okay. But then the commit nothing to do with LLVM 21 and has no functional effect now, so why is it in the LLVM 21 bump PR?

I thought that the intent of unpinning LLVM in Rust was to update Rust’s LLVM when we update the default LLVM, so pinning it because we’re updating to 21 instead doesn’t make sense to me. If we want to unpin Rust’s LLVM so that it always matches the default LLVM, then we should want Rust to start using LLVM 21 when we make that the default, right?

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'm not sure, I'm about to sleep so I can't think. Let's see what rust maintainers think. Maybe @alyssais would have a good idea?

Copy link
Member

Choose a reason for hiding this comment

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

Rust should just use our default version of LLVM.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@emilazy
Copy link
Member

emilazy commented Sep 14, 2025

We’re close to landing the work I did to get this ready for merge but it needs a rebase and the Rust stuff addressing.

@emilazy
Copy link
Member

emilazy commented Sep 16, 2025

Needs another rebase 😅

@RossComputerGuy
Copy link
Member Author

Fixed, hopefully that's the last time I have to rebase this PR.

@emilazy
Copy link
Member

emilazy commented Sep 16, 2025

Yeah, there’s still fixes in the pipeline but now that we have the Darwin system libc++ PR merged staging is close enough to the environment I’ve been testing things in that I feel confident merging this for the next cycle. Let’s do this.

@emilazy emilazy merged commit 6b3366e into NixOS:staging Sep 16, 2025
27 of 31 checks passed
@RossComputerGuy RossComputerGuy deleted the feat/llvm-bump branch September 16, 2025 03:54
@trofi
Copy link
Contributor

trofi commented Sep 19, 2025

Bisect says that cabe58b llvmPackages: llvmPackages_19 -> llvmPackages_21 broke a few packages in staging:

  • nixd:

    $ nix build --no-link -f. nixd -L
    ...
    nixd> llvm-config found: NO
    nixd> Run-time dependency LLVM found: NO (tried config-tool)
    nixd>
    nixd> meson.build:34:7: ERROR: Dependency lookup for llvm with method 'cmake' failed: Dependency LLVM not found:     PACKAGE_FOUND is false
    
  • cvise:

    $ nix build --no-link -f. cvise -L
    ...
    cvise> [ 44%] Building CXX object clang_delta/CMakeFiles/clang_delta.dir/MergeBaseClass.cpp.o
    cvise> In file included from /build/source/clang_delta/RemoveBaseClass.cpp:19:
    cvise> /build/source/clang_delta/CommonRenameClassRewriteVisitor.h: In member function ‘bool   clang_delta_common_visitor::CommonRenameClassRewriteVisitor<T>::VisitDependentTemplateSpe cializationTypeLoc(clang::DependentTemplateSpecializationTypeLoc)’:
    cvise> /build/source/clang_delta/CommonRenameClassRewriteVisitor.h:371:40: error: ‘const class clang::DependentTemplateSpecializationType’ has no member named ‘getIdentifier’
    cvise>   371 |   const IdentifierInfo *IdInfo = DTST->getIdentifier();
    cvise>       |                                        ^~~~~~~~~~~~~
    

@trofi
Copy link
Contributor

trofi commented Oct 6, 2025

Now that llvmPackages is at 21 in master it also broke cvise. Proposed a workaround as:

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 6.topic: rust General-purpose programming language emphasizing performance, type safety, and concurrency. 8.has: changelog This PR adds or changes release notes 8.has: documentation This PR adds or changes documentation 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants