Disable obj loading for targets (Fix #554)
This commit is contained in:
parent
6ad71af001
commit
e92bd0af48
@ -223,22 +223,19 @@ withInteractiveContext action = gbracket setup teardown body
|
|||||||
topImports >>= setCtx
|
topImports >>= setCtx
|
||||||
action
|
action
|
||||||
topImports = do
|
topImports = do
|
||||||
mss <- getModuleGraph
|
ms <- filterM moduleIsInterpreted =<< map ms_mod <$> getModuleGraph
|
||||||
mns <- map modName <$> filterM isTop mss
|
liftIO $ print (map modName ms)
|
||||||
let ii = map IIModule mns
|
let iis = map (IIModule . modName) ms
|
||||||
#if __GLASGOW_HASKELL__ >= 704
|
#if __GLASGOW_HASKELL__ >= 704
|
||||||
return ii
|
return iis
|
||||||
#else
|
#else
|
||||||
return (ii,[])
|
return (iis,[])
|
||||||
#endif
|
#endif
|
||||||
isTop mos = lookupMod mos ||> returnFalse
|
|
||||||
lookupMod mos = lookupModule (ms_mod_name mos) Nothing >> return True
|
|
||||||
returnFalse = return False
|
|
||||||
#if __GLASGOW_HASKELL__ >= 706
|
#if __GLASGOW_HASKELL__ >= 706
|
||||||
modName = moduleName . ms_mod
|
modName = moduleName
|
||||||
setCtx = setContext
|
setCtx = setContext
|
||||||
#elif __GLASGOW_HASKELL__ >= 704
|
#elif __GLASGOW_HASKELL__ >= 704
|
||||||
modName = ms_mod
|
modName = id
|
||||||
setCtx = setContext
|
setCtx = setContext
|
||||||
#else
|
#else
|
||||||
modName = ms_mod
|
modName = ms_mod
|
||||||
|
@ -409,12 +409,14 @@ resolveGmComponents mumns cs = do
|
|||||||
-- | Set the files as targets and load them.
|
-- | Set the files as targets and load them.
|
||||||
loadTargets :: IOish m => [GHCOption] -> [FilePath] -> GmlT m ()
|
loadTargets :: IOish m => [GHCOption] -> [FilePath] -> GmlT m ()
|
||||||
loadTargets opts targetStrs = do
|
loadTargets opts targetStrs = do
|
||||||
targets <-
|
targets' <-
|
||||||
withLightHscEnv opts $ \env ->
|
withLightHscEnv opts $ \env ->
|
||||||
liftM (nubBy ((==) `on` targetId))
|
liftM (nubBy ((==) `on` targetId))
|
||||||
(mapM ((`guessTarget` Nothing) >=> mapFile env) targetStrs)
|
(mapM ((`guessTarget` Nothing) >=> mapFile env) targetStrs)
|
||||||
>>= mapM relativize
|
>>= mapM relativize
|
||||||
|
|
||||||
|
let targets = map (\t -> t { targetAllowObjCode = False }) targets'
|
||||||
|
|
||||||
gmLog GmDebug "loadTargets" $
|
gmLog GmDebug "loadTargets" $
|
||||||
text "Loading" <+>: fsep (map (text . showTargetId) targets)
|
text "Loading" <+>: fsep (map (text . showTargetId) targets)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user