diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2019-05-30 16:20:26 +0100 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2019-06-07 14:25:05 +0100 |
commit | ae159d42eab21429d23f6f208b46a13f2fb59cb3 (patch) | |
tree | 10bb7b1b4033b816baa90b1036327486a67e910f | |
parent | ba4e3934abc82e0ba2bec51842315819910d1018 (diff) | |
download | haskell-wip/t16716.tar.gz |
hadrian: Properly partition options in sourceArgswip/t16716
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
-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 ] |