From ad1e6fbd58fcf94ff7197cd617ba2d94809bee35 Mon Sep 17 00:00:00 2001 From: Shogo Takata Date: Tue, 19 May 2026 07:39:01 +0900 Subject: [PATCH] circt: 1.140.0 -> 1.147.0 Updates circt to 1.147.0. --- pkgs/by-name/ci/circt/circt-llvm.nix | 4 +++- pkgs/by-name/ci/circt/package.nix | 17 +++++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/ci/circt/circt-llvm.nix b/pkgs/by-name/ci/circt/circt-llvm.nix index 706171fcd5de..48b2a38c0262 100644 --- a/pkgs/by-name/ci/circt/circt-llvm.nix +++ b/pkgs/by-name/ci/circt/circt-llvm.nix @@ -14,6 +14,8 @@ stdenv.mkDerivation { requiredSystemFeatures = [ "big-parallel" ]; + __structuredAttrs = true; + nativeBuildInputs = [ cmake ninja @@ -33,7 +35,7 @@ stdenv.mkDerivation { # Based on utils/build-llvm.sh (lib.cmakeBool "BUILD_SHARED_LIBS" true) (lib.cmakeBool "LLVM_BUILD_EXAMPLES" false) - (lib.cmakeBool "LLVM_ENABLE_ASSERTIONS" true) + (lib.cmakeBool "LLVM_ENABLE_ASSERTIONS" false) # Conflicts with nixpkgs hardening options (lib.cmakeBool "LLVM_ENABLE_BINDINGS" false) (lib.cmakeBool "LLVM_ENABLE_OCAMLDOC" false) (lib.cmakeFeature "LLVM_ENABLE_PROJECTS" "mlir") diff --git a/pkgs/by-name/ci/circt/package.nix b/pkgs/by-name/ci/circt/package.nix index 925a98b3fbf8..fdfc8496d016 100644 --- a/pkgs/by-name/ci/circt/package.nix +++ b/pkgs/by-name/ci/circt/package.nix @@ -9,7 +9,7 @@ ninja, lit, z3, - sv-lang_9, # update sv-lang version here according to upstream requirements + sv-lang_10, # update sv-lang version here according to upstream requirements fmt, boost, mimalloc, @@ -27,17 +27,19 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "circt"; - version = "1.140.0"; + version = "1.147.0"; src = fetchFromGitHub { owner = "llvm"; repo = "circt"; tag = "firtool-${finalAttrs.version}"; - hash = "sha256-oitdYNGsEyraQqouOt9srfbDgVGFOAGZMdcf/rjnx5Q="; + hash = "sha256-rtnvahI7EzUJXE80X3XPWjjDD/6f9BPmZ7S97Lstuhw="; fetchSubmodules = true; }; requiredSystemFeatures = [ "big-parallel" ]; + __structuredAttrs = true; + nativeBuildInputs = [ cmake ninja @@ -53,7 +55,7 @@ stdenv.mkDerivation (finalAttrs: { boost fmt mimalloc - sv-lang_9 + sv-lang_10 ]; cmakeFlags = [ @@ -110,18 +112,21 @@ stdenv.mkDerivation (finalAttrs: { postPatch = '' patchShebangs tools/circt-test + # Replace slang references to match the package in nixpkgs substituteInPlace \ lib/Tools/circt-verilog-lsp-server/VerilogServerImpl/CMakeLists.txt \ lib/Conversion/ImportVerilog/CMakeLists.txt \ + unittests/Conversion/ImportVerilog/CMakeLists.txt \ --replace-fail "slang_slang" "slang::slang" - ''; - preConfigure = '' + # Patch shebang in test mlir files find ./test -name '*.mlir' -exec sed -i 's|/usr/bin/env|${coreutils}/bin/env|g' {} \; + # circt uses git to check its version, but when cloned on nix it can't access git. # So this hard codes the version. substituteInPlace cmake/modules/GenVersionFile.cmake \ --replace-fail "unknown git version" "${finalAttrs.src.rev}" + # Increase timeout on tests because some were failing on hydra. # Using `replace-warn` so it doesn't break when upstream changes the timeout. substituteInPlace integration_test/CMakeLists.txt \