Mercurial > urweb
comparison src/compiler.sml @ 855:28e42b22424d
Initial implementation of protocols in Settings
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 23 Jun 2009 15:56:04 -0400 |
parents | 19fdeef40ada |
children | 3d2f6cb6d54a |
comparison
equal
deleted
inserted
replaced
854:158d980889ac | 855:28e42b22424d |
---|---|
881 | 881 |
882 val toSqlify = transform sqlify "sqlify" o toMono_opt2 | 882 val toSqlify = transform sqlify "sqlify" o toMono_opt2 |
883 | 883 |
884 fun compileC {cname, oname, ename, libs, profile, debug, link = link'} = | 884 fun compileC {cname, oname, ename, libs, profile, debug, link = link'} = |
885 let | 885 let |
886 val proto = Settings.currentProtocol () | |
886 val urweb_o = clibFile "urweb.o" | 887 val urweb_o = clibFile "urweb.o" |
887 val request_o = clibFile "request.o" | |
888 val driver_o = clibFile "driver.o" | |
889 | 888 |
890 val compile = "gcc " ^ Config.gccArgs ^ " -Wstrict-prototypes -Werror -O3 -I " ^ Config.includ | 889 val compile = "gcc " ^ Config.gccArgs ^ " -Wstrict-prototypes -Werror -O3 -I " ^ Config.includ |
891 ^ " -c " ^ cname ^ " -o " ^ oname | 890 ^ " -c " ^ cname ^ " -o " ^ oname |
892 val link = "gcc -Werror -O3 -lm -lmhash -pthread " ^ libs ^ " " ^ urweb_o ^ " " ^ oname | 891 val link = "gcc -Werror -O3 -lm -lmhash -pthread " ^ libs ^ " " ^ urweb_o ^ " " ^ oname |
893 ^ " " ^ request_o ^ " " ^ driver_o ^ " -o " ^ ename | 892 ^ " " ^ #link proto ^ " -o " ^ ename |
894 | 893 |
895 val (compile, link) = | 894 val (compile, link) = |
896 if profile then | 895 if profile then |
897 (compile ^ " -pg", link ^ " -pg") | 896 (compile ^ " -pg", link ^ " -pg") |
898 else | 897 else |