packcheck icon indicating copy to clipboard operation
packcheck copied to clipboard

Implement a GHC_OPTIONS_LOCAL envvar

Open harendra-kumar opened this issue 4 years ago • 0 comments

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.

harendra-kumar avatar Jun 07 '21 18:06 harendra-kumar