summaryrefslogtreecommitdiff
path: root/src/compiler.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-12-27 14:25:22 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-12-27 14:25:22 -0500
commita26a03c0de18158614e0d374fd49a281444871db (patch)
treecfafe28760c47460a4ffe49b3e1458e20f439ad9 /src/compiler.sml
parent834b3a5799b14cc722dfca9205c4b37e2faedce4 (diff)
Protocol-specific compiler options
Diffstat (limited to 'src/compiler.sml')
-rw-r--r--src/compiler.sml5
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