Skip to content

Commit 5d1cc3e

Browse files
committed
nix: use -O2 on all packages
1 parent 6ca8737 commit 5d1cc3e

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

nix/haskell.nix

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -351,11 +351,14 @@ let
351351
lib.mkOption {
352352
type = lib.types.submodule (
353353
{ config, lib, ... }:
354-
lib.mkIf config.package.isLocal
355-
{
356-
configureFlags = [ "--ghc-option=-Werror"]
357-
++ lib.optional (args.config.compiler.version == "8.10.7") "--ghc-option=-Wwarn=unused-packages";
358-
}
354+
lib.mkMerge [
355+
(lib.mkIf config.package.isLocal {
356+
configureFlags = [ "--ghc-option=-Werror" "--ghc-option=-O2" ];
357+
})
358+
(lib.mkIf (!config.package.isLocal) {
359+
configureFlags = [ "--ghc-option=-O2" ];
360+
})
361+
]
359362
);
360363
});
361364
})

0 commit comments

Comments
 (0)