Skip to content

Commit

Permalink
Allow overriding path and setting options for Cabal PROGs
Browse files Browse the repository at this point in the history
  • Loading branch information
kgadek committed May 7, 2017
1 parent ea10057 commit 3c841e8
Show file tree
Hide file tree
Showing 6 changed files with 791 additions and 18 deletions.
2 changes: 2 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ Other enhancements:
a method to ensure PVP compliance without having to proactively fix
bounds issues for Stackage maintenance.
* Expose a `save-hackage-creds` configuration option
* Add the ability to explictly specify path and options to executables.
See [#2369](https://github.com/commercialhaskell/stack/issues/2369).

Bug fixes:

Expand Down
6 changes: 4 additions & 2 deletions doc/yaml_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,12 +392,14 @@ extra-lib-dirs:
- /opt/foo/lib
```

### with-gcc
### with-gcc/with-ld/with-strip

Specify a path to gcc explicitly, rather than relying on the normal path resolution.
Specify a path to gcc, ld, or strip explicitly, rather than relying on the normal path resolution.

```yaml
with-gcc: /usr/local/bin/gcc-5
with-ld: /usr/local/bin/ld
with-strip: /usr/local/bin/gstrip
```

### compiler-check
Expand Down
53 changes: 52 additions & 1 deletion src/Stack/Config.hs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,58 @@ configFromConfigMonoid

configExtraIncludeDirs = configMonoidExtraIncludeDirs
configExtraLibDirs = configMonoidExtraLibDirs
configOverrideGccPath = getFirst configMonoidOverrideGccPath
configProgAlexPath = getFirst configMonoidProgAlexPath
configProgArPath = getFirst configMonoidProgArPath
configProgC2hsPath = getFirst configMonoidProgC2hsPath
configProgCpphsPath = getFirst configMonoidProgCpphsPath
configProgGccPath = getFirst configMonoidProgGccPath
configProgGhcPath = getFirst configMonoidProgGhcPath
configProgGhcPkgPath = getFirst configMonoidProgGhcPkgPath
configProgGhcjsPath = getFirst configMonoidProgGhcjsPath
configProgGhcjsPkgPath = getFirst configMonoidProgGhcjsPkgPath
configProgGreencardPath = getFirst configMonoidProgGreencardPath
configProgHaddockPath = getFirst configMonoidProgHaddockPath
configProgHappyPath = getFirst configMonoidProgHappyPath
configProgHaskellSuitePath = getFirst configMonoidProgHaskellSuitePath
configProgHaskellSuitePkgPath = getFirst configMonoidProgHaskellSuitePkgPath
configProgHmakePath = getFirst configMonoidProgHmakePath
configProgHpcPath = getFirst configMonoidProgHpcPath
configProgHsc2hsPath = getFirst configMonoidProgHsc2hsPath
configProgHscolourPath = getFirst configMonoidProgHscolourPath
configProgJhcPath = getFirst configMonoidProgJhcPath
configProgLdPath = getFirst configMonoidProgLdPath
configProgLhcPath = getFirst configMonoidProgLhcPath
configProgLhcPkgPath = getFirst configMonoidProgLhcPkgPath
configProgPkgConfigPath = getFirst configMonoidProgPkgConfigPath
configProgStripPath = getFirst configMonoidProgStripPath
configProgTarPath = getFirst configMonoidProgTarPath
configProgUhcPath = getFirst configMonoidProgUhcPath
configProgAlexOptions = configMonoidProgAlexOptions
configProgArOptions = configMonoidProgArOptions
configProgC2hsOptions = configMonoidProgC2hsOptions
configProgCpphsOptions = configMonoidProgCpphsOptions
configProgGccOptions = configMonoidProgGccOptions
configProgGhcOptions = configMonoidProgGhcOptions
configProgGhcPkgOptions = configMonoidProgGhcPkgOptions
configProgGhcjsOptions = configMonoidProgGhcjsOptions
configProgGhcjsPkgOptions = configMonoidProgGhcjsPkgOptions
configProgGreencardOptions = configMonoidProgGreencardOptions
configProgHaddockOptions = configMonoidProgHaddockOptions
configProgHappyOptions = configMonoidProgHappyOptions
configProgHaskellSuiteOptions = configMonoidProgHaskellSuiteOptions
configProgHaskellSuitePkgOptions = configMonoidProgHaskellSuitePkgOptions
configProgHmakeOptions = configMonoidProgHmakeOptions
configProgHpcOptions = configMonoidProgHpcOptions
configProgHsc2hsOptions = configMonoidProgHsc2hsOptions
configProgHscolourOptions = configMonoidProgHscolourOptions
configProgJhcOptions = configMonoidProgJhcOptions
configProgLdOptions = configMonoidProgLdOptions
configProgLhcOptions = configMonoidProgLhcOptions
configProgLhcPkgOptions = configMonoidProgLhcPkgOptions
configProgPkgConfigOptions = configMonoidProgPkgConfigOptions
configProgStripOptions = configMonoidProgStripOptions
configProgTarOptions = configMonoidProgTarOptions
configProgUhcOptions = configMonoidProgUhcOptions

-- Only place in the codebase where platform is hard-coded. In theory
-- in the future, allow it to be configured.
Expand Down
Loading

0 comments on commit 3c841e8

Please sign in to comment.