summaryrefslogtreecommitdiff
path: root/hadrian
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-09-27 17:01:42 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-12-09 20:15:45 -0500
commit4937c0bb32e208bd6588d3de6d168b112711a342 (patch)
tree7efe84bd308110aa310b1bcd74928a106755675e /hadrian
parent65335d10c72a01cb52dbebd2a026c8c4dae2f88f (diff)
downloadhaskell-4937c0bb32e208bd6588d3de6d168b112711a342.tar.gz
hadrian-multi: Put interface files in separate directories
Before we were putting all the interface files in the same directory which was leading to collisions if the files were called the same thing.
Diffstat (limited to 'hadrian')
-rwxr-xr-xhadrian/ghci-multi-cabal.in2
-rw-r--r--hadrian/src/Rules/ToolArgs.hs4
2 files changed, 4 insertions, 2 deletions
diff --git a/hadrian/ghci-multi-cabal.in b/hadrian/ghci-multi-cabal.in
index 525f5987a4..ca9607b9f0 100755
--- a/hadrian/ghci-multi-cabal.in
+++ b/hadrian/ghci-multi-cabal.in
@@ -10,4 +10,4 @@ export TOOL_OUTPUT=.hadrian_ghci_multi/ghci_args
# Replace newlines with spaces, as these otherwise break the ghci invocation on windows.
CABFLAGS=-v0 "hadrian/build-cabal" multi:ghc --build-root=.hadrian_ghci_multi --flavour=ghc-in-ghci $HADRIAN_ARGS
GHC_FLAGS="$GHC_FLAGS $(cat $TOOL_OUTPUT | tr '\n\r' ' ')"
-$GHC --interactive $GHC_FLAGS $@ -fno-code -fwrite-interface -hidir=.hadrian_ghci_multi/interface -O0 +RTS -A128m
+$GHC --interactive $GHC_FLAGS $@ -fno-code -fwrite-interface -O0 +RTS -A128m
diff --git a/hadrian/src/Rules/ToolArgs.hs b/hadrian/src/Rules/ToolArgs.hs
index c7a31fea3c..a82ca951ba 100644
--- a/hadrian/src/Rules/ToolArgs.hs
+++ b/hadrian/src/Rules/ToolArgs.hs
@@ -84,9 +84,11 @@ multiSetup pkg_s = do
gens <- interpretInContext c generatedDependencies
need (srcs ++ gens)
let rexp m = ["-reexported-module", m]
+ let hidir = root </> "interfaces" </> pkgPath p
writeFile' (resp_file root p) (intercalate "\n" (th_hack arg_list
++ modules cd
- ++ concatMap rexp (reexportModules cd) ))
+ ++ concatMap rexp (reexportModules cd)
+ ++ ["-outputdir", hidir]))
return (resp_file root p)