Mercurial > urweb
diff src/compiler.sml @ 742:43553c93dd8c
Reading blobs from the database
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 26 Apr 2009 10:45:59 -0400 |
parents | f2a2be93331c |
children | 7f653298dd66 |
line wrap: on
line diff
--- a/src/compiler.sml Sun Apr 26 09:02:17 2009 -0400 +++ b/src/compiler.sml Sun Apr 26 10:45:59 2009 -0400 @@ -605,7 +605,7 @@ val toSqlify = transform sqlify "sqlify" o toMono_opt2 -fun compileC {cname, oname, ename, libs, profile} = +fun compileC {cname, oname, ename, libs, profile, debug} = let val urweb_o = clibFile "urweb.o" val driver_o = clibFile "driver.o" @@ -618,6 +618,12 @@ (compile ^ " -pg", link ^ " -pg") else (compile, link) + + val (compile, link) = + if debug then + (compile ^ " -g", link ^ " -g") + else + (compile, link) in if not (OS.Process.isSuccess (OS.Process.system compile)) then print "C compilation failed\n" @@ -682,7 +688,8 @@ TextIO.closeOut outf end; - compileC {cname = cname, oname = oname, ename = ename, libs = libs, profile = #profile job}; + compileC {cname = cname, oname = oname, ename = ename, libs = libs, + profile = #profile job, debug = #debug job}; cleanup () end