From abb182d538c7db6a81b1ac3b73653b040ecfed75 Mon Sep 17 00:00:00 2001 From: Avimitin Date: Thu, 22 Aug 2024 18:53:09 +0800 Subject: [PATCH] [nix] fix generated filelist Signed-off-by: Avimitin --- nix/t1/rtl.nix | 6 ++++-- nix/t1/verilated.nix | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/nix/t1/rtl.nix b/nix/t1/rtl.nix index 55dff3eb09..56c02af193 100644 --- a/nix/t1/rtl.nix +++ b/nix/t1/rtl.nix @@ -22,9 +22,11 @@ stdenvNoCC.mkDerivation { firtool ${mlirbc}/${mlirbc.elaborateTarget}-${mlirbc.elaborateConfig}-lowered.mlirbc \ -o $out ${mfcArgs} '' + lib.optionalString fixupFilelist '' + # FIXME: https://github.com/llvm/circt/pull/7543 echo "Fixing generated filelist.f" - cat $out/firrtl_black_box_resource_files.f >> $out/filelist.f - rm $out/firrtl_black_box_resource_files.f + pushd $out + find . -mindepth 1 -name '*.sv' -type f > $out/filelist.f + popd ''; meta.description = "All the elaborated system verilog files for ${mlirbc.elaborateTarget} with ${mlirbc.elaborateConfig} config."; diff --git a/nix/t1/verilated.nix b/nix/t1/verilated.nix index 498c2ea9b2..942258cc8e 100644 --- a/nix/t1/verilated.nix +++ b/nix/t1/verilated.nix @@ -25,6 +25,7 @@ stdenv.mkDerivation { --timing \ --threads 8 \ -O1 \ + -F filelist.f \ --cc TestBench echo "[nix] building verilated C lib"