diff options
-rwxr-xr-x | hadrian/hie-bios | 4 | ||||
-rw-r--r-- | hadrian/src/Rules/ToolArgs.hs | 14 |
2 files changed, 14 insertions, 4 deletions
diff --git a/hadrian/hie-bios b/hadrian/hie-bios index 4def2e8823..dcf36963b5 100755 --- a/hadrian/hie-bios +++ b/hadrian/hie-bios @@ -1,7 +1,7 @@ #! /usr/bin/env bash +HADRIAN_DIR=`dirname "$0"` # When run, this program will output a list of arguments which are necessary to # load the GHC library component into GHCi. The program is used by `ghcide` in # order to automatically set up the correct GHC API session for a project. -TERM=dumb CABFLAGS=-v0 $PWD/hadrian/build-cabal tool:$1 -q --build-root=.hie-bios --flavour=ghc-in-ghci > $HIE_BIOS_OUTPUT - +TERM=dumb CABFLAGS=-v0 $HADRIAN_DIR/build-cabal tool:$1 -q -j --build-root=.hie-bios --flavour=ghc-in-ghci > $HIE_BIOS_OUTPUT diff --git a/hadrian/src/Rules/ToolArgs.hs b/hadrian/src/Rules/ToolArgs.hs index 8277d580fa..dffbf33d38 100644 --- a/hadrian/src/Rules/ToolArgs.hs +++ b/hadrian/src/Rules/ToolArgs.hs @@ -34,6 +34,7 @@ import System.Directory (canonicalizePath) -- options needed to compile the specific file. toolArgsTarget :: Rules () toolArgsTarget = do + -- TODO: magic `(drop 5 s)` phonys (\s -> if "tool:" `isPrefixOf` s then Just (toolRuleBody (drop 5 s)) else Nothing) toolRuleBody :: FilePath -> Action () @@ -98,7 +99,17 @@ toolTargets = [ array , stm , time , unlit - , xhtml ] + , xhtml + , checkApiAnnotations + , checkPpr + , compareSizes + , deriveConstants + , genapply + , genprimopcode + , ghcPkg + , hpc + , hpcBin + , runGhc ] -- | Create a mapping from files to which component it belongs to. dirMap :: Action [(FilePath, (Package, [String]))] @@ -125,4 +136,3 @@ dirMap = do cd <- readContextData c ids <- liftIO $ mapM canonicalizePath [pkgPath p </> i | i <- srcDirs cd] return $ map (,(p, modules cd ++ otherModules cd)) ids - |