summaryrefslogtreecommitdiff
path: root/ghc
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2013-05-21 10:34:04 +0100
committerSimon Marlow <marlowsd@gmail.com>2013-05-21 13:38:07 +0100
commit1e2b3780ebc40d28cd0f029b90df102df09e6827 (patch)
tree56aead4bd6d52ad3512fde51a3033dafe930d453 /ghc
parent1d3fa868d139fb9a8a5e8b0e408c4c70389db8c3 (diff)
downloadhaskell-1e2b3780ebc40d28cd0f029b90df102df09e6827.tar.gz
Handle -opt<blah> options more consistently (#7909)
Now these are always added by the run<blah> functions in SysTools, so we never miss any out. Several cleanups resulted.
Diffstat (limited to 'ghc')
-rw-r--r--ghc/Main.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/ghc/Main.hs b/ghc/Main.hs
index 629529271c..f636c380b2 100644
--- a/ghc/Main.hs
+++ b/ghc/Main.hs
@@ -198,7 +198,8 @@ main' postLoadMode dflags0 args flagWarnings = do
normal_fileish_paths = map (normalise . unLoc) fileish_args
(srcs, objs) = partition_args normal_fileish_paths [] []
- dflags5 = dflags4 { ldInputs = objs ++ ldInputs dflags4 }
+ dflags5 = dflags4 { ldInputs = map (FileOption "") objs
+ ++ ldInputs dflags4 }
-- we've finished manipulating the DynFlags, update the session
_ <- GHC.setSessionDynFlags dflags5
@@ -638,7 +639,8 @@ doMake srcs = do
o_files <- mapM (\x -> liftIO $ compileFile hsc_env StopLn x)
non_hs_srcs
dflags <- GHC.getSessionDynFlags
- let dflags' = dflags { ldInputs = o_files ++ ldInputs dflags }
+ let dflags' = dflags { ldInputs = map (FileOption "") o_files
+ ++ ldInputs dflags }
_ <- GHC.setSessionDynFlags dflags'
targets <- mapM (uncurry GHC.guessTarget) hs_srcs