Mercurial > urweb
comparison src/compiler.sml @ 272:4d80d6122df1
Initializing database connection
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 02 Sep 2008 11:57:25 -0400 |
parents | 42dfb0d61cf0 |
children | e4baf03a3a64 |
comparison
equal
deleted
inserted
replaced
271:42dfb0d61cf0 | 272:4d80d6122df1 |
---|---|
415 val toCjrize = transform cjrize "cjrize" o toMono_opt2 | 415 val toCjrize = transform cjrize "cjrize" o toMono_opt2 |
416 | 416 |
417 fun compileC {cname, oname, ename} = | 417 fun compileC {cname, oname, ename} = |
418 let | 418 let |
419 val compile = "gcc -O3 -I include -c " ^ cname ^ " -o " ^ oname | 419 val compile = "gcc -O3 -I include -c " ^ cname ^ " -o " ^ oname |
420 val link = "gcc -pthread -O3 clib/urweb.o " ^ oname ^ " clib/driver.o -o " ^ ename | 420 val link = "gcc -O3 -pthread -lpq clib/urweb.o " ^ oname ^ " clib/driver.o -o " ^ ename |
421 in | 421 in |
422 if not (OS.Process.isSuccess (OS.Process.system compile)) then | 422 if not (OS.Process.isSuccess (OS.Process.system compile)) then |
423 print "C compilation failed\n" | 423 print "C compilation failed\n" |
424 else if not (OS.Process.isSuccess (OS.Process.system link)) then | 424 else if not (OS.Process.isSuccess (OS.Process.system link)) then |
425 print "C linking failed\n" | 425 print "C linking failed\n" |