Mercurial > urweb
comparison src/compiler.sml @ 1474:3d0cc841cafd
Fixes to work nicely with OS X and Clang (thanks to Austin Seipp)
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Fri, 17 Jun 2011 11:52:56 -0400 |
parents | d40066b38710 |
children | a10d080123ec |
comparison
equal
deleted
inserted
replaced
1473:d40066b38710 | 1474:3d0cc841cafd |
---|---|
1316 val lib = if Settings.getStaticLinking () then | 1316 val lib = if Settings.getStaticLinking () then |
1317 #linkStatic proto ^ " " ^ Config.lib ^ "/../liburweb.a" | 1317 #linkStatic proto ^ " " ^ Config.lib ^ "/../liburweb.a" |
1318 else | 1318 else |
1319 "-L" ^ Config.lib ^ "/.. -lurweb " ^ #linkDynamic proto | 1319 "-L" ^ Config.lib ^ "/.. -lurweb " ^ #linkDynamic proto |
1320 | 1320 |
1321 val compile = "gcc " ^ Config.gccArgs ^ " -Wimplicit -Werror -O3 -fno-inline -I " ^ Config.includ | 1321 val compile = Config.ccompiler ^ " " ^ Config.gccArgs ^ " -Wimplicit -Werror -O3 -fno-inline -I " ^ Config.includ |
1322 ^ " " ^ #compile proto | 1322 ^ " " ^ #compile proto |
1323 ^ " -c " ^ escapeFilename cname ^ " -o " ^ escapeFilename oname | 1323 ^ " -c " ^ escapeFilename cname ^ " -o " ^ escapeFilename oname |
1324 | 1324 |
1325 val link = "gcc -Werror -O3 -lm -pthread " ^ Config.gccArgs ^ " " ^ lib ^ " " ^ Config.openssl ^ " " ^ escapeFilename oname | 1325 val link = Config.ccompiler ^ " -Werror -O3 -lm -pthread " ^ Config.gccArgs ^ " " ^ lib ^ " " ^ Config.openssl ^ " " ^ escapeFilename oname |
1326 ^ " -o " ^ escapeFilename ename ^ " " ^ libs | 1326 ^ " -o " ^ escapeFilename ename ^ " " ^ libs |
1327 | 1327 |
1328 val (compile, link) = | 1328 val (compile, link) = |
1329 if profile then | 1329 if profile then |
1330 (compile ^ " -pg", link ^ " -pg") | 1330 (compile ^ " -pg", link ^ " -pg") |