Skip to content

Implement a GHC_OPTIONS_LOCAL envvar #43

Description

@harendra-kumar

In cabal GHC_OPTIONS envvar translates to the --ghc-options cabal flag, which enables ghc options for all dependencies. We can have another flag to set the ghc options only on the package being built.

To implement that we can create a temporary cabal.project file in .packcheck dir, copy the original cabal.project to this and add a ghc-options stanza in it with the specified options. Then use this cabal.project for build.

In case of sdist build we anyway create a fresh cabal.project, we can add the ghc-options stanza to it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions