Skip to content

cabal check warns about -O2 even if it is just a flag #7423

@andreasabel

Description

@andreasabel

I have a .cabal-file that passes ghc-options: -O2 under a specific flag:
https://raw.githubusercontent.com/haskell-hvr/regex-tdfa/master/regex-tdfa.cabal

cabal check issues a warning.

$ cabal check
Warning: These warnings may cause trouble when distributing the package:
Warning: 'ghc-options: -O2' is rarely needed. Check that it is giving a real
benefit and not just imposing longer compile times on your users.

I think the warning should not be issued if -O2 is only passed to ghc under a flag.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions