diff --git a/src/System/Plugins/Consts.hs b/src/System/Plugins/Consts.hs index 5142fae..2fea08c 100644 --- a/src/System/Plugins/Consts.hs +++ b/src/System/Plugins/Consts.hs @@ -20,7 +20,7 @@ module System.Plugins.Consts where -#include "../../../config.h" +#include "config.h" #if __GLASGOW_HASKELL__ >= 604 diff --git a/src/System/Plugins/Env.hs b/src/System/Plugins/Env.hs index 1826f7f..0a24c64 100644 --- a/src/System/Plugins/Env.hs +++ b/src/System/Plugins/Env.hs @@ -50,7 +50,7 @@ module System.Plugins.Env ( ) where -#include "../../../config.h" +#include "config.h" import System.Plugins.LoadTypes (Module) import System.Plugins.Consts ( sysPkgSuffix ) @@ -76,7 +76,7 @@ import DynFlags ( Way(WayDyn), dynamicGhc, ways, #endif defaultDynFlags, initDynFlags) -import SysTools (initSysTools) +import SysTools (initSysTools, initLlvmConfig) import Distribution.Package hiding ( #if MIN_VERSION_ghc(7,6,0) @@ -466,7 +466,8 @@ lookupPkg' p = withPkgEnvs env $ \fms -> go fms p -- If we're loading dynamic libs we need the cbits to appear before the -- real packages. settings <- initSysTools (Just libdir) - dflags <- initDynFlags $ defaultDynFlags settings + llvmConfig <- initLlvmConfig (Just libdir) + dflags <- initDynFlags $ defaultDynFlags settings llvmConfig libs <- mapM (findHSlib #if MIN_VERSION_ghc(7,8,0) (WayDyn `elem` ways dflags || dynamicGhc) diff --git a/src/System/Plugins/Load.hs b/src/System/Plugins/Load.hs index bff1b21..32a5a08 100644 --- a/src/System/Plugins/Load.hs +++ b/src/System/Plugins/Load.hs @@ -61,7 +61,7 @@ module System.Plugins.Load ( ) where -#include "../../../config.h" +#include "config.h" import System.Plugins.Make ( build ) import System.Plugins.Env @@ -104,7 +104,7 @@ import GHC ( defaultCallbacks ) #else import DynFlags (defaultDynFlags, initDynFlags) import GHC.Paths (libdir) -import SysTools (initSysTools) +import SysTools (initSysTools, initLlvmConfig) #endif import GHC.Ptr ( Ptr(..), nullPtr ) #if !MIN_VERSION_ghc(7,4,1) @@ -127,7 +127,8 @@ readBinIface' hi_path = do -- kludgy as hell #if MIN_VERSION_ghc(7,2,0) mySettings <- initSysTools (Just libdir) -- how should we really set the top dir? - dflags <- initDynFlags (defaultDynFlags mySettings) + llvmConfig <- initLlvmConfig (Just libdir) + dflags <- initDynFlags (defaultDynFlags mySettings llvmConfig) e <- newHscEnv dflags #else e <- newHscEnv defaultCallbacks undefined diff --git a/src/System/Plugins/Parser.hs b/src/System/Plugins/Parser.hs index 9970359..739249a 100644 --- a/src/System/Plugins/Parser.hs +++ b/src/System/Plugins/Parser.hs @@ -25,7 +25,7 @@ module System.Plugins.Parser ( replaceModName ) where -#include "../../../config.h" +#include "config.h" import Data.List import Data.Char diff --git a/src/System/Plugins/Utils.hs b/src/System/Plugins/Utils.hs index bec328e..5c7bb4b 100644 --- a/src/System/Plugins/Utils.hs +++ b/src/System/Plugins/Utils.hs @@ -58,7 +58,7 @@ module System.Plugins.Utils ( ) where -#include "../../../config.h" +#include "config.h" import System.Plugins.Env ( isLoaded ) import System.Plugins.Consts ( objSuf, hiSuf, tmpDir ) @@ -289,7 +289,7 @@ findFile (ext:exts) file infixr 6 infixr 6 <.> -(), (<.>), (<+>), (<>) :: FilePath -> FilePath -> FilePath +(), (<.>), (<+>) :: FilePath -> FilePath -> FilePath [] b = b a b = a ++ "/" ++ b @@ -299,9 +299,6 @@ a <.> b = a ++ "." ++ b [] <+> b = b a <+> b = a ++ " " ++ b -[] <> b = b -a <> b = a ++ b - -- -- | dirname : return the directory portion of a file path -- if null, return "."