Commit e2b6e45e authored by Ian Lynagh's avatar Ian Lynagh

Remove some more stdout/stderr uses

parent 93abcfa5
......@@ -295,7 +295,7 @@ reallyInitDynLinker dflags =
-- (d) Link .o files from the command-line
; cmdline_ld_inputs <- readIORef v_Ld_inputs
; classified_ld_inputs <- mapM classifyLdInput cmdline_ld_inputs
; classified_ld_inputs <- mapM (classifyLdInput dflags) cmdline_ld_inputs
-- (e) Link any MacOS frameworks
; let framework_paths
......@@ -321,12 +321,13 @@ reallyInitDynLinker dflags =
; return pls
}}
classifyLdInput :: FilePath -> IO (Maybe LibrarySpec)
classifyLdInput f
classifyLdInput :: DynFlags -> FilePath -> IO (Maybe LibrarySpec)
classifyLdInput dflags f
| isObjectFilename f = return (Just (Object f))
| isDynLibFilename f = return (Just (DLLPath f))
| otherwise = do
hPutStrLn stderr ("Warning: ignoring unrecognised input `" ++ f ++ "'")
log_action dflags SevInfo noSrcSpan defaultUserStyle
(text ("Warning: ignoring unrecognised input `" ++ f ++ "'"))
return Nothing
preloadLib :: DynFlags -> [String] -> [String] -> LibrarySpec -> IO ()
......
......@@ -1493,8 +1493,9 @@ mkExtraObjToLinkIntoBinary dflags = do
_ -> True
when (dopt Opt_NoHsMain dflags && have_rts_opts_flags) $ do
hPutStrLn stderr $ "Warning: -rtsopts and -with-rtsopts have no effect with -no-hs-main.\n" ++
" Call hs_init_ghc() from your main() function to set these options."
log_action dflags SevInfo noSrcSpan defaultUserStyle
(text "Warning: -rtsopts and -with-rtsopts have no effect with -no-hs-main." $$
text " Call hs_init_ghc() from your main() function to set these options.")
mkExtraObj dflags "c" (showSDoc main)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment