I just tried it with a clean fetch from main (7fb8630e71c4) with no additinal changes and it also fails:
[1533/4817] Building CXX object lib/Transforms/Coroutines/CMakeFiles/LLVMCoroutines.dir/Coroutines.cpp.o
[1534/4817] Building R600GenAsmWriter.inc...
[1535/4817] Building CXX object lib/Transforms/Coroutines/CMakeFiles/LLVMCoroutines.dir/CoroEarly.cpp.o
[1536/4817] Building CXX object lib/Transforms/Coroutines/CMakeFiles/LLVMCoroutines.dir/CoroFrame.cpp.o
[1537/4817] Building CXX object lib/ExecutionEngine/Orc/Shared/CMakeFiles/LLVMOrcShared.dir/SimpleRemoteEPCUtils.cpp.o
[1538/4817] Building CXX object lib/Transforms/CFGuard/CMakeFiles/LLVMCFGuard.dir/CFGuard.cpp.o
[1539/4817] Building CXX object lib/Transforms/HipStdPar/CMakeFiles/LLVMHipStdPar.dir/HipStdPar.cpp.o
[1540/4817] Building R600GenCallingConv.inc...
[1541/4817] Building R600GenSubtargetInfo.inc...
[1542/4817] Building R600GenMCCodeEmitter.inc...
[1543/4817] Building R600GenDAGISel.inc...
FAILED: lib/Target/AMDGPU/R600GenDAGISel.inc /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/build/lib/Target/AMDGPU/R600GenDAGISel.inc
cd /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/build/lib/Target/AMDGPU && /nix/store/gcc4gk5ayaxpnxvm8pajsxpsw54wwqjj-llvm-tblgen-22.0.0-unstable-2025-08-03/bin/llvm-tblgen -gen-dag-isel -I/build/llvm-src-22.0.0-unstable-2025-08-03>
Included from /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/R600.td:40:
/build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/R600Instructions.td:1692:1: error: Type set is empty for each HW mode in 'anonymous_8907'
def : ExtractVerticalPat <R600_EXTRACT_ELT_V2, v2i32, i32>;
^
[1544/4817] Building R600GenDFAPacketizer.inc...
[1545/4817] Building HexagonGenAsmMatcher.inc...
[1546/4817] Building R600GenRegisterInfo.inc...
[1547/4817] Building HexagonGenCallingConv.inc...
[1548/4817] Building R600GenInstrInfo.inc...
FAILED: lib/Target/AMDGPU/R600GenInstrInfo.inc /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/build/lib/Target/AMDGPU/R600GenInstrInfo.inc
cd /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/build/lib/Target/AMDGPU && /nix/store/gcc4gk5ayaxpnxvm8pajsxpsw54wwqjj-llvm-tblgen-22.0.0-unstable-2025-08-03/bin/llvm-tblgen -gen-instr-info -I/build/llvm-src-22.0.0-unstable-2025-08->
Included from /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/R600.td:40:
/build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/R600Instructions.td:1692:1: error: Type set is empty for each HW mode in 'anonymous_8907'
def : ExtractVerticalPat <R600_EXTRACT_ELT_V2, v2i32, i32>;
^
[1549/4817] Building HexagonGenAsmWriter.inc...
[1550/4817] Building HexagonGenDAGISel.inc...
FAILED: lib/Target/Hexagon/HexagonGenDAGISel.inc /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/build/lib/Target/Hexagon/HexagonGenDAGISel.inc
cd /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/build/lib/Target/Hexagon && /nix/store/gcc4gk5ayaxpnxvm8pajsxpsw54wwqjj-llvm-tblgen-22.0.0-unstable-2025-08-03/bin/llvm-tblgen -gen-dag-isel -I/build/llvm-src-22.0.0-unstable-2025-08-0>
Included from /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/Hexagon/Hexagon.td:402:
/build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/Hexagon/HexagonPatterns.td:526:1: error: Type set is empty for each HW mode in 'anonymous_9818'
def: Pat<(v2i16 (sext V2I1:$Pu)), (S2_vtrunehb (C2_mask V2I1:$Pu))>;
^
[1551/4817] Building AMDGPUGenPostLegalizeGICombiner.inc...
[1552/4817] Building AMDGPUGenDisassemblerTables.inc...
[1553/4817] Building AMDGPUGenGlobalISel.inc...
FAILED: lib/Target/AMDGPU/AMDGPUGenGlobalISel.inc /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/build/lib/Target/AMDGPU/AMDGPUGenGlobalISel.inc
cd /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/build/lib/Target/AMDGPU && /nix/store/gcc4gk5ayaxpnxvm8pajsxpsw54wwqjj-llvm-tblgen-22.0.0-unstable-2025-08-03/bin/llvm-tblgen -gen-global-isel -I/build/llvm-src-22.0.0-unstable-2025-08>
Included from /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/AMDGPUGISel.td:13:
Included from /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/AMDGPU.td:2897:
Included from /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/SIInstrInfo.td:3439:
Included from /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/SIInstructions.td:26:
Included from /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/VOPInstructions.td:2195:
/build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/VOPCInstructions.td:384:7: error: Type set is empty for each HW mode in 'V_CMP_F_F32_e64'
def _e64 : VOP3_Pseudo<opName, P, getVOPCPat64<cond, P>.ret, /*IsVOP3P*/false, P.HasOpSel>,
^
Included from /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/AMDGPUGISel.td:13:
Included from /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/AMDGPU.td:2897:
Included from /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/SIInstrInfo.td:3439:
Included from /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/SIInstructions.td:26:
Included from /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/VOPInstructions.td:2195:
/build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/VOPCInstructions.td:587:20: note: instantiated from multiclass
defm V_CMP_F_F32 : VOPC_F32 <"v_cmp_f_f32">;
^
[1554/4817] Building AMDGPUGenMCCodeEmitter.inc...
[1555/4817] Building AMDGPUGenAsmWriter.inc...
[1556/4817] Building AMDGPUGenInstrInfo.inc...
FAILED: lib/Target/AMDGPU/AMDGPUGenInstrInfo.inc /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/build/lib/Target/AMDGPU/AMDGPUGenInstrInfo.inc
cd /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/build/lib/Target/AMDGPU && /nix/store/gcc4gk5ayaxpnxvm8pajsxpsw54wwqjj-llvm-tblgen-22.0.0-unstable-2025-08-03/bin/llvm-tblgen -gen-instr-info -I/build/llvm-src-22.0.0-unstable-2025-08->
Included from /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/AMDGPU.td:2897:
Included from /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/SIInstrInfo.td:3439:
Included from /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/SIInstructions.td:26:
Included from /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/VOPInstructions.td:2195:
/build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/VOPCInstructions.td:384:7: error: Type set is empty for each HW mode in 'V_CMP_F_F32_e64'
def _e64 : VOP3_Pseudo<opName, P, getVOPCPat64<cond, P>.ret, /*IsVOP3P*/false, P.HasOpSel>,
^
Included from /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/AMDGPU.td:2897:
Included from /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/SIInstrInfo.td:3439:
Included from /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/SIInstructions.td:26:
Included from /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/VOPInstructions.td:2195:
/build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/VOPCInstructions.td:587:20: note: instantiated from multiclass
defm V_CMP_F_F32 : VOPC_F32 <"v_cmp_f_f32">;
^
[1557/4817] Building AMDGPUGenMCPseudoLowering.inc...
[1558/4817] Building AMDGPUGenPreLegalizeGICombiner.inc...
[1559/4817] Building AMDGPUGenCallingConv.inc...
[1560/4817] Building AMDGPUGenRegBankGICombiner.inc...
[1561/4817] Building AMDGPUGenSubtargetInfo.inc...
[1562/4817] Building AMDGPUGenAsmMatcher.inc...
[1563/4817] Building AMDGPUGenRegisterInfo.inc...
[1564/4817] Building AMDGPUGenSearchableTables.inc...
[1565/4817] Building AMDGPUGenDAGISel.inc...
FAILED: lib/Target/AMDGPU/AMDGPUGenDAGISel.inc /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/build/lib/Target/AMDGPU/AMDGPUGenDAGISel.inc
cd /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/build/lib/Target/AMDGPU && /nix/store/gcc4gk5ayaxpnxvm8pajsxpsw54wwqjj-llvm-tblgen-22.0.0-unstable-2025-08-03/bin/llvm-tblgen -gen-dag-isel -I/build/llvm-src-22.0.0-unstable-2025-08-03>
Included from /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/AMDGPU.td:2897:
Included from /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/SIInstrInfo.td:3439:
Included from /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/SIInstructions.td:26:
Included from /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/VOPInstructions.td:2195:
/build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/VOPCInstructions.td:384:7: error: Type set is empty for each HW mode in 'V_CMP_F_F32_e64'
def _e64 : VOP3_Pseudo<opName, P, getVOPCPat64<cond, P>.ret, /*IsVOP3P*/false, P.HasOpSel>,
^
Included from /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/AMDGPU.td:2897:
Included from /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/SIInstrInfo.td:3439:
Included from /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/SIInstructions.td:26:
Included from /build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/VOPInstructions.td:2195:
/build/llvm-src-22.0.0-unstable-2025-08-03/llvm/lib/Target/AMDGPU/VOPCInstructions.td:587:20: note: instantiated from multiclass
defm V_CMP_F_F32 : VOPC_F32 <"v_cmp_f_f32">;
^
[1566/4817] Building AMDGPUGenRegisterBank.inc...
ninja: build stopped: subcommand failed.
{
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
};
outputs =
{
self,
nixpkgs,
}:
let
system = "x86_64-linux";
overlays = [
(self: super: {
ccacheWrapper = super.ccacheWrapper.override {
extraConfig = ''
export CCACHE_COMPRESS=1
export CCACHE_DIR="/var/cache/ccache"
export CCACHE_UMASK=007
export CCACHE_SLOPPINESS=random_seed
if [ ! -d "$CCACHE_DIR" ]; then
echo "====="
echo "Directory '$CCACHE_DIR' does not exist"
echo "Please create it with:"
echo " sudo mkdir -m0770 '$CCACHE_DIR'"
echo " sudo chown root:nixbld '$CCACHE_DIR'"
echo "====="
exit 1
fi
if [ ! -w "$CCACHE_DIR" ]; then
echo "====="
echo "Directory '$CCACHE_DIR' is not accessible for user $(whoami)"
echo "Please verify its access permissions"
echo "====="
exit 1
fi
'';
};
})
(final: super: {
llvmPackages_custom = super.llvmPackages_git.override (prev: {
monorepoSrc = (fetchGit /home/user/dev/llvm) // {
passthru = {
owner = "";
repo = "";
rev = "";
};
};
version = "22.0.0";
doCheck = false;
dontUnpack = true;
stdenv = super.ccacheStdenv;
});
})
];
pkgs = import nixpkgs {
inherit system overlays;
};
in
{
packages.${system}.default = pkgs.stdenv.mkDerivation {
name = "test";
src = ./.;
buildInputs = [
pkgs.llvmPackages_custom.clang-tools
];
};
};
}
I mean, it failed, because that test derivation of yours doesn’t produce any output, but the LLVM itself built successfully.
All I need is a dev env where I can test changes I made to tools on external projects (e.g., fmtlib). I’m not trying to package anything, so direnv with use flake /home/user/dev/flake-test --impure is what I am using (just with more packages in buildInputs for the set of projects I want to test).