Mercurial > urweb
comparison src/compiler.sml @ 1317:e12cef71aa1a
Karn Kallio's patch for static mhash linking
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Thu, 18 Nov 2010 14:22:04 -0500 |
parents | d2ad997ca157 |
children | a6427d1eda6f |
comparison
equal
deleted
inserted
replaced
1316:df7bfb30dcc3 | 1317:e12cef71aa1a |
---|---|
1223 | 1223 |
1224 fun compileC {cname, oname, ename, libs, profile, debug, link = link'} = | 1224 fun compileC {cname, oname, ename, libs, profile, debug, link = link'} = |
1225 let | 1225 let |
1226 val proto = Settings.currentProtocol () | 1226 val proto = Settings.currentProtocol () |
1227 | 1227 |
1228 val lib = if Settings.getStaticLinking () then | 1228 val (lib, mhash) = if Settings.getStaticLinking () then |
1229 #linkStatic proto ^ " " ^ Config.lib ^ "/../liburweb.a" | 1229 (#linkStatic proto ^ " " ^ Config.lib ^ "/../liburweb.a", Config.libMhash ^ "/libmhash.a") |
1230 else | 1230 else |
1231 "-L" ^ Config.lib ^ "/.. -lurweb " ^ #linkDynamic proto | 1231 ("-L" ^ Config.lib ^ "/.. -lurweb " ^ #linkDynamic proto, "-L" ^ Config.libMhash ^ " -lmhash") |
1232 | 1232 |
1233 val compile = "gcc " ^ Config.gccArgs ^ " -Wimplicit -Werror -O3 -fno-inline -I " ^ Config.includ | 1233 val compile = "gcc " ^ Config.gccArgs ^ " -Wimplicit -Werror -O3 -fno-inline -I " ^ Config.includ |
1234 ^ " " ^ #compile proto | 1234 ^ " " ^ #compile proto |
1235 ^ " -c " ^ cname ^ " -o " ^ oname | 1235 ^ " -c " ^ cname ^ " -o " ^ oname |
1236 | 1236 |
1237 val link = "gcc -Werror -O3 -lm -lmhash -pthread " ^ Config.gccArgs ^ " " ^ libs ^ " " ^ lib ^ " " ^ oname | 1237 val link = "gcc -Werror -O3 -lm -pthread " ^ Config.gccArgs ^ " " ^ libs ^ " " ^ lib ^ " " ^ mhash ^ " " ^ oname |
1238 ^ " -o " ^ ename | 1238 ^ " -o " ^ ename |
1239 | 1239 |
1240 val (compile, link) = | 1240 val (compile, link) = |
1241 if profile then | 1241 if profile then |
1242 (compile ^ " -pg", link ^ " -pg") | 1242 (compile ^ " -pg", link ^ " -pg") |