Commit 6cc5709b authored by simonmar's avatar simonmar
Browse files

[project @ 2000-07-14 08:19:02 by simonmar]

Add -keep-tmp-files flag, to tell the driver not to delete tmp files.
Useful mainly for debugging the driver, and obsoletes the GHC
folklore of using ^Z for this purpose.
parent 77a8c0db
......@@ -161,9 +161,13 @@ instance Typeable BarfKind where
-- Temporary files
GLOBAL_VAR(files_to_clean, [], [String])
GLOBAL_VAR(keep_tmp_files, False, Bool)
cleanTempFiles :: IO ()
cleanTempFiles = do
forget_it <- readIORef keep_tmp_files
if forget_it then return () else do
fs <- readIORef files_to_clean
verb <- readIORef verbose
......@@ -1763,6 +1767,7 @@ opts =
, ( "keep-hc-file" , AnySuffix (\_ -> writeIORef keep_hc_files True) )
, ( "keep-s-file" , AnySuffix (\_ -> writeIORef keep_s_files True) )
, ( "keep-raw-s-file", AnySuffix (\_ -> writeIORef keep_raw_s_files True) )
, ( "keep-tmp-files" , AnySuffix (\_ -> writeIORef keep_tmp_files True) )
, ( "split-objs" , NoArg (if can_split
then do writeIORef split_object_files True
......
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