summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 ]