Disable obj loading for targets (Fix #554)

This commit is contained in:
Daniel Gröber
2015-09-10 07:48:13 +02:00
parent 6ad71af001
commit e92bd0af48
2 changed files with 10 additions and 11 deletions

View File

@@ -409,12 +409,14 @@ resolveGmComponents mumns cs = do
-- | Set the files as targets and load them.
loadTargets :: IOish m => [GHCOption] -> [FilePath] -> GmlT m ()
loadTargets opts targetStrs = do
targets <-
targets' <-
withLightHscEnv opts $ \env ->
liftM (nubBy ((==) `on` targetId))
(mapM ((`guessTarget` Nothing) >=> mapFile env) targetStrs)
>>= mapM relativize
let targets = map (\t -> t { targetAllowObjCode = False }) targets'
gmLog GmDebug "loadTargets" $
text "Loading" <+>: fsep (map (text . showTargetId) targets)