diff options
| author | Nick Cao <nickcao@nichi.co> | 2023-02-10 18:38:56 +0800 |
|---|---|---|
| committer | Nick Cao <nickcao@nichi.co> | 2023-02-10 18:41:05 +0800 |
| commit | 3364d76c0b4df219ddbdc13bb6e84af78d67c496 (patch) | |
| tree | 5a6c0527e0f88d7a57dcfc9a9d593d3f5705922b | |
| parent | Merge pull request #215600 from r-ryantm/auto-update/goresym (diff) | |
| download | nixpkgs-3364d76c0b4df219ddbdc13bb6e84af78d67c496.tar.gz | |
circt: fix build with non clang stdenv
lib.optionalString creates an empty string when the condition is false
And the circt test framework interprets this as disabling all tests
failing the build with `error: filter did not match any tests`
| -rw-r--r-- | pkgs/development/compilers/circt/default.nix | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/development/compilers/circt/default.nix b/pkgs/development/compilers/circt/default.nix index ce06782eb126..a8e36cbc785f 100644 --- a/pkgs/development/compilers/circt/default.nix +++ b/pkgs/development/compilers/circt/default.nix @@ -49,7 +49,8 @@ stdenv.mkDerivation rec { # https://github.com/NixOS/nixpkgs/issues/214945 discusses this issue. # # As a temporary fix, we disabled these tests when using clang stdenv - LIT_FILTER_OUT = lib.optionalString stdenv.cc.isClang "CIRCT :: Target/ExportSystemC/.*\.mlir"; + # cannot use lib.optionalString as it creates an empty string, disabling all tests + LIT_FILTER_OUT = if stdenv.cc.isClang then "CIRCT :: Target/ExportSystemC/.*\.mlir" else null; preConfigure = '' substituteInPlace test/circt-reduce/test/annotation-remover.mlir --replace "/usr/bin/env" "${coreutils}/bin/env" |
