summaryrefslogtreecommitdiff
path: root/Build/EvilLinker.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-12-06 12:48:39 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-12-06 12:48:39 -0400
commit56e7b06646e9cdfdad0ea10d72ee8069d984ce74 (patch)
tree8042b5273f9a2a44cc50a8314eb596d5c8cb43c9 /Build/EvilLinker.hs
parent9dc88bc04cfad71319e484e8fc1797d0852d4a28 (diff)
update
Diffstat (limited to 'Build/EvilLinker.hs')
-rw-r--r--Build/EvilLinker.hs18
1 files changed, 9 insertions, 9 deletions
diff --git a/Build/EvilLinker.hs b/Build/EvilLinker.hs
index 2dcf0f1ea..2e6482374 100644
--- a/Build/EvilLinker.hs
+++ b/Build/EvilLinker.hs
@@ -43,22 +43,22 @@ parseGhcLink = do
restOfLine
{- Find where gcc calls collect1. -}
-parseCollect1 :: Parser CmdParams
-parseCollect1 = error "TODO"
+parseGccLink :: Parser CmdParams
+parseGccLink = error "TODO"
{- Find where collect1 calls ld. -}
-parseLd :: Parser CmdParams
-parseLd = error "TODO"
+parseCollect1 :: Parser CmdParams
+parseCollect1 = error "TODO"
restOfLine :: Parser String
restOfLine = newline `after` many (noneOf "\n")
+{- Intentionally ignores command failure; the whole point is to work around
+ - that. -}
getOutput :: String -> [String] -> IO String
getOutput cmd params = do
putStrLn $ unwords [cmd, show params]
- (log, ok) <- processTranscript cmd params Nothing
- unless ok $
- error $ cmd ++ " failed:\n\n" ++ log
+ (log, _ok) <- processTranscript cmd params Nothing
return log
runParser' :: Parser a -> String -> a
@@ -81,6 +81,6 @@ main = do
["build", "--ghc-options=-v -keep-tmp-files"]
gccout <- runAtFile parseGhcLink ghcout "gcc.opt" ["-v"]
writeFile "gcc.out" gccout
- collect1out <- runAtFile parseCollect1 gccout "collect1.opt" ["-v"]
+ collect1out <- runAtFile parseGccLink gccout "collect1.opt" ["-v"]
writeFile "collect1.out" collect1out
- void $ runAtFile parseLd collect1out "ld.opt" []
+ void $ runAtFile parseCollect1 collect1out "ld.opt" []