diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-12-27 14:25:22 -0500 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-12-27 14:25:22 -0500 |
commit | 03605f653bdd50bedb38a77759a61d2e978fbeb2 (patch) | |
tree | cfafe28760c47460a4ffe49b3e1458e20f439ad9 /src/compiler.sml | |
parent | c5a46fa63373c129e9595373d4c126030266d957 (diff) |
Protocol-specific compiler options
Diffstat (limited to 'src/compiler.sml')
-rw-r--r-- | src/compiler.sml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler.sml b/src/compiler.sml index 1ef8c5b1..28b8dc2c 100644 --- a/src/compiler.sml +++ b/src/compiler.sml @@ -529,7 +529,8 @@ fun parseUrp' accLibs fname = 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 @@ fun compileC {cname, oname, ename, libs, profile, debug, link = link'} = "-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 |