Open hvr opened 9 years ago
@dcoutts suggested on IRC:
hvr: ok, so I think it should be as simple as...
diff --git a/cabal-install/Distribution/Client/Config.hs b/cabal-install/Distribution/Client/Config.hs
index 679ba49..b485665 100644
--- a/cabal-install/Distribution/Client/Config.hs
+++ b/cabal-install/Distribution/Client/Config.hs
@@ -376,7 +376,7 @@ configFieldDescriptions =
++ toSavedConfig liftConfigFlag
(configureOptions ParseArgs)
- (["builddir", "configure-option", "constraint", "dependency"]
+ (["builddir", "constraint", "dependency"]
++ map fieldName installDirsFields)
ie stop deliberately removing that option from the set
and then you'll be able to use configure-option in the config file
note you can use it multiple times if necessary
it's a list monoid
...and that allows me to use
configure-option: --build=x86_64-w64-mingw32
in the global config section (i.e. not inside the program-defaults-options
section)
While the commit I just pushed solves my problem, I'm not sure if the inconsistency of configure-option
being special (i.e. by not being part of the program-defaults-options
section) needs to be addressed long-term.
Currently, the cabal
config
file does not allow to persist settings such aswhich are essential when using a cygwin environment with a mingw crosscompiler (as otherwise
config.guess
would report an inappropriate platform tuple)(see also https://github.com/haskell/cabal/issues/1950#issuecomment-56495108 )