Mercurial > urweb
diff src/compiler.sml @ 1096:324c9ffe8ff9
Protocol-specific compiler options
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 27 Dec 2009 14:25:22 -0500 |
parents | bed675db3aff |
children | 72670131dace |
line wrap: on
line diff
--- a/src/compiler.sml Sun Dec 27 13:18:32 2009 -0500 +++ b/src/compiler.sml Sun Dec 27 14:25:22 2009 -0500 @@ -529,7 +529,8 @@ timeout := SOME (valOf (Int.fromString arg))) | "ffi" => ffi := relify arg :: !ffi | "link" => let - val arg = if size arg >= 2 andalso String.substring (arg, 0, 2) = "-l" then + val arg = if size arg >= 1 + andalso String.sub (arg, 0) = #"-" then arg else relifyA arg @@ -1033,7 +1034,9 @@ "-L" ^ Config.libC ^ " -lurweb " ^ #linkDynamic proto val compile = "gcc " ^ Config.gccArgs ^ " -Wimplicit -Werror -O3 -fno-inline -I " ^ Config.includ + ^ " " ^ #compile proto ^ " -c " ^ cname ^ " -o " ^ oname + val link = "gcc -Werror -O3 -lm -lmhash -pthread " ^ Config.gccArgs ^ " " ^ libs ^ " " ^ lib ^ " " ^ oname ^ " -o " ^ ename