comparison src/compiler.sml @ 287:3ed7a7c7b060

Ask GCC to strip executables
author Adam Chlipala <adamc@hcoop.net>
date Sun, 07 Sep 2008 10:52:51 -0400
parents 0236d9412ad2
children 59dc042629b9
comparison
equal deleted inserted replaced
286:ffe5b01908ae 287:3ed7a7c7b060
465 465
466 val toSqlify = transform sqlify "sqlify" o toMono_opt2 466 val toSqlify = transform sqlify "sqlify" o toMono_opt2
467 467
468 fun compileC {cname, oname, ename} = 468 fun compileC {cname, oname, ename} =
469 let 469 let
470 val compile = "gcc -O3 -I include -c " ^ cname ^ " -o " ^ oname 470 val compile = "gcc -s -O3 -I include -c " ^ cname ^ " -o " ^ oname
471 val link = "gcc -O3 -pthread -lpq clib/urweb.o " ^ oname ^ " clib/driver.o -o " ^ ename 471 val link = "gcc -s -O3 -pthread -lpq clib/urweb.o " ^ oname ^ " clib/driver.o -o " ^ ename
472 in 472 in
473 if not (OS.Process.isSuccess (OS.Process.system compile)) then 473 if not (OS.Process.isSuccess (OS.Process.system compile)) then
474 print "C compilation failed\n" 474 print "C compilation failed\n"
475 else if not (OS.Process.isSuccess (OS.Process.system link)) then 475 else if not (OS.Process.isSuccess (OS.Process.system link)) then
476 print "C linking failed\n" 476 print "C linking failed\n"