diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2019-05-30 16:20:26 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-06-09 11:49:09 -0400 |
commit | 970e480230bc8422d9bd9a6f1011def86befc34a (patch) | |
tree | 58aba4be3e234e07525749eb8c5950fa16b88895 /hadrian | |
parent | 0462b0e02d8759983484eb09d0ba1be134ec592e (diff) | |
download | haskell-970e480230bc8422d9bd9a6f1011def86befc34a.tar.gz |
hadrian: Properly partition options in sourceArgs
Previously if you build the `ghc` package then it would has the default
opts and the library opts. This is different behaviour to make where the
library opts are only reserved for things in the `libraries`
subdirectory (I believe)
Fixes #16716
Diffstat (limited to 'hadrian')
-rw-r--r-- | hadrian/src/Settings/Default.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hadrian/src/Settings/Default.hs b/hadrian/src/Settings/Default.hs index f60a11e024..16e63fb04b 100644 --- a/hadrian/src/Settings/Default.hs +++ b/hadrian/src/Settings/Default.hs @@ -179,7 +179,10 @@ sourceArgs :: SourceArgs -> Args sourceArgs SourceArgs {..} = builder Ghc ? mconcat [ hsDefault , getContextData hcOpts - , libraryPackage ? hsLibrary + -- `compiler` is also a library but the specific arguments that we want + -- to apply to that are given by the hsCompiler option. `ghc` is an + -- executable so we don't have to exclude that. + , libraryPackage ? notM (packageOneOf [compiler]) ? hsLibrary , package compiler ? hsCompiler , package ghc ? hsGhc ] |