Skip to content

v2-cabal: Don't rebuild dependencies when -O0 or -fno-code is supplied as --ghc-options #7368

Closed
@andreasabel

Description

@andreasabel

It seems that cabal v2-build wants to rebuild all dependencies when I add --ghc-options=-O0 or ...=-fno-code to e.g. just check compilability after a change.

I don't understand the rationale behind this behavior.

Is there a workaround? I'd like to alternate compilation between -fno-code (for just type-checking), -O0 (for running a first few test), and -O1 (for thorough testing with a large testsuite).

See also #2442 and #1176.

Example see #1176 (comment).

Metadata

Metadata

Assignees

No one assigned

    Labels

    can-workaroundThere is a (maybe partial) workaround for the issue or missing featurere: -fno-codeConcerning type-checking-only buildsre: ghc-optionsConcerning passing options to GHC

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions