update
This commit is contained in:
parent
03f0fa1f2f
commit
598dc56222
1 changed files with 9 additions and 9 deletions
|
@ -43,22 +43,22 @@ parseGhcLink = do
|
||||||
restOfLine
|
restOfLine
|
||||||
|
|
||||||
{- Find where gcc calls collect1. -}
|
{- Find where gcc calls collect1. -}
|
||||||
parseCollect1 :: Parser CmdParams
|
parseGccLink :: Parser CmdParams
|
||||||
parseCollect1 = error "TODO"
|
parseGccLink = error "TODO"
|
||||||
|
|
||||||
{- Find where collect1 calls ld. -}
|
{- Find where collect1 calls ld. -}
|
||||||
parseLd :: Parser CmdParams
|
parseCollect1 :: Parser CmdParams
|
||||||
parseLd = error "TODO"
|
parseCollect1 = error "TODO"
|
||||||
|
|
||||||
restOfLine :: Parser String
|
restOfLine :: Parser String
|
||||||
restOfLine = newline `after` many (noneOf "\n")
|
restOfLine = newline `after` many (noneOf "\n")
|
||||||
|
|
||||||
|
{- Intentionally ignores command failure; the whole point is to work around
|
||||||
|
- that. -}
|
||||||
getOutput :: String -> [String] -> IO String
|
getOutput :: String -> [String] -> IO String
|
||||||
getOutput cmd params = do
|
getOutput cmd params = do
|
||||||
putStrLn $ unwords [cmd, show params]
|
putStrLn $ unwords [cmd, show params]
|
||||||
(log, ok) <- processTranscript cmd params Nothing
|
(log, _ok) <- processTranscript cmd params Nothing
|
||||||
unless ok $
|
|
||||||
error $ cmd ++ " failed:\n\n" ++ log
|
|
||||||
return log
|
return log
|
||||||
|
|
||||||
runParser' :: Parser a -> String -> a
|
runParser' :: Parser a -> String -> a
|
||||||
|
@ -81,6 +81,6 @@ main = do
|
||||||
["build", "--ghc-options=-v -keep-tmp-files"]
|
["build", "--ghc-options=-v -keep-tmp-files"]
|
||||||
gccout <- runAtFile parseGhcLink ghcout "gcc.opt" ["-v"]
|
gccout <- runAtFile parseGhcLink ghcout "gcc.opt" ["-v"]
|
||||||
writeFile "gcc.out" gccout
|
writeFile "gcc.out" gccout
|
||||||
collect1out <- runAtFile parseCollect1 gccout "collect1.opt" ["-v"]
|
collect1out <- runAtFile parseGccLink gccout "collect1.opt" ["-v"]
|
||||||
writeFile "collect1.out" collect1out
|
writeFile "collect1.out" collect1out
|
||||||
void $ runAtFile parseLd collect1out "ld.opt" []
|
void $ runAtFile parseCollect1 collect1out "ld.opt" []
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue