summaryrefslogtreecommitdiff
path: root/hadrian
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2019-05-30 16:20:26 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-06-09 11:49:09 -0400
commit970e480230bc8422d9bd9a6f1011def86befc34a (patch)
tree58aba4be3e234e07525749eb8c5950fa16b88895 /hadrian
parent0462b0e02d8759983484eb09d0ba1be134ec592e (diff)
downloadhaskell-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.hs5
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 ]