From 89baf5322593ceb45ee3d1d19a295dcd398ad793 Mon Sep 17 00:00:00 2001 From: Luna Nova Date: Sat, 20 Sep 2025 17:10:29 -0700 Subject: [PATCH 1/2] llvmPackages.libllvm: fix enablePolly = false Setting enablePolly = false was failing due to trying to patch a file that doesn't exist > applying patch /nix/store/gr73nf6sca9nyzl88x58y3qxrav04yhd-polly-lit-cfg-add-libs-to-dylib-path.patch > can't find file to patch at input line 5 --- pkgs/development/compilers/llvm/common/llvm/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/development/compilers/llvm/common/llvm/default.nix b/pkgs/development/compilers/llvm/common/llvm/default.nix index 6146c51e2d00..a4fd8d469ef5 100644 --- a/pkgs/development/compilers/llvm/common/llvm/default.nix +++ b/pkgs/development/compilers/llvm/common/llvm/default.nix @@ -206,8 +206,6 @@ stdenv.mkDerivation ( ++ lib.optionals enablePolly [ # Just like the `gnu-install-dirs` patch, but for `polly`. (getVersionFile "llvm/gnu-install-dirs-polly.patch") - ] - ++ [ # Just like the `llvm-lit-cfg` patch, but for `polly`. (getVersionFile "llvm/polly-lit-cfg-add-libs-to-dylib-path.patch") ] From b84248686baa595c7a34b64acd82d4c7d21555fc Mon Sep 17 00:00:00 2001 From: Luna Nova Date: Sat, 20 Sep 2025 17:18:33 -0700 Subject: [PATCH 2/2] llvmPackages.libllvm: add passthru.tests.withoutOptionalFeatures This makes it easier to test optional flags still work. Just adding one that disables multiple because the build is fairly slow and I don't think exercising them all separately is going to be worth the extra build time. --- .../compilers/llvm/common/llvm/default.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/llvm/common/llvm/default.nix b/pkgs/development/compilers/llvm/common/llvm/default.nix index a4fd8d469ef5..279be22f7757 100644 --- a/pkgs/development/compilers/llvm/common/llvm/default.nix +++ b/pkgs/development/compilers/llvm/common/llvm/default.nix @@ -36,6 +36,8 @@ devExtraCmakeFlags ? [ ], getVersionFile, fetchpatch, + # for tests + libllvm, }: let @@ -589,8 +591,15 @@ stdenv.mkDerivation ( checkTarget = "check-all"; - # For the update script: - passthru.monorepoSrc = monorepoSrc; + passthru = { + # For the update script: + inherit monorepoSrc; + tests.withoutOptionalFeatures = libllvm.override { + enablePFM = false; + enablePolly = false; + enableTerminfo = false; + }; + }; requiredSystemFeatures = [ "big-parallel" ]; meta = llvm_meta // {