Closed
Description
Describe the bug
As per title, cabal install
ignores --ghc-options
. This is changed from 3.6.
To Reproduce
Compare:
$ cabal-3.6.2.0 v2-install --ghc-option=-foo hello --verbose
// irrelevant...
/home/livid/.ghcup/bin/cabal-3.6.2.0 act-as-setup --build-type=Simple --
configure --verbose=2 --builddir=dist --ghc
// boilerplate...
--ghc-option=-hide-all-packages --ghc-option=-foo // <== here! the option is passed through
// more irrelevant
ghc: unrecognised flag: -foo // <== as expected
Usage: For basic information, try the `--help' option.
cabal-3.6.2.0: Failed to build
hello-1.0.0.2-0dbbae9b57058f3d4ff9f9e497f74f6444d6d82befb75c49e4ce49000b6f36a7.
The failure occurred during the configure step.
$ cabal-3.8.1.0 v2-install --ghc-option=-foo hello --verbose
// irrelevant...
/home/livid/.ghcup/bin/cabal-3.8.1.0 act-as-setup --build-type=Simple --
configure --verbose=2 --builddir=dist --ghc
// boilerplate...
--ghc-option=-hide-all-packages // <== here! the option is not passed through!
// irrelevant
Completed hello-1.0.0.2 (all, legacy fallback)
Expected behavior
I don't know if this change is intentional, but as I couldn't find anything mentioning this specifically in the changelog, I'm guessing not.
System information
- Operating system: Linux x86_64
cabal
,ghc
versions: cabal 3.8.1.0, ghc 9.0.2.
Additional context
Passing --ghc-options=-optl-static
etc is actually pretty convenient in some cases. Besides, it's rather surprising that configuration options are ignored on install
in the first place.