summaryrefslogtreecommitdiff
path: root/src/compiler.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@csail.mit.edu>2016-01-02 07:50:03 -0500
committerGravatar Adam Chlipala <adamc@csail.mit.edu>2016-01-02 07:50:03 -0500
commit2db6f2680dc91cd32b7c76e354bc39fe5192c857 (patch)
treeed4744430468c99054572d3dfa04e68a3575816b /src/compiler.sml
parent36be1e34ee331c59847200e01bde8f860ed7e510 (diff)
parent4489a6b433f38be0b20e5a69fd4a52ef81ef731b (diff)
Merge pull request #10 from eranmeir/pthread_linker_flags
Prevent pthread cflags options from being passed to linker
Diffstat (limited to 'src/compiler.sml')
-rw-r--r--src/compiler.sml8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/compiler.sml b/src/compiler.sml
index bf7491e5..e2dc168e 100644
--- a/src/compiler.sml
+++ b/src/compiler.sml
@@ -878,7 +878,7 @@ fun parseUrp' accLibs fname =
| "jsFile" =>
(Settings.setFilePath thisPath;
Settings.addJsFile arg)
-
+
| _ => ErrorMsg.error ("Unrecognized command '" ^ cmd ^ "'");
read ()
end
@@ -1503,7 +1503,9 @@ fun compileC {cname, oname, ename, libs, profile, debug, linker, link = link'} =
let
val proto = Settings.currentProtocol ()
- val lib = if Settings.getStaticLinking () then
+ val lib = if Settings.getBootLinking () then
+ !Settings.configLib ^ "/" ^ #linkStatic proto ^ " " ^ !Settings.configLib ^ "/liburweb.a"
+ else if Settings.getStaticLinking () then
" -static " ^ !Settings.configLib ^ "/" ^ #linkStatic proto ^ " " ^ !Settings.configLib ^ "/liburweb.a"
else
"-L" ^ !Settings.configLib ^ " " ^ #linkDynamic proto ^ " -lurweb"
@@ -1518,7 +1520,7 @@ fun compileC {cname, oname, ename, libs, profile, debug, linker, link = link'} =
^ " " ^ #compile proto
^ " -c " ^ escapeFilename cname ^ " -o " ^ escapeFilename oname
- val linker = Option.getOpt (linker, (Settings.getCCompiler ()) ^ " -Werror" ^ opt ^ " " ^ Config.ccArgs ^ " " ^ Config.pthreadCflags ^ " " ^ Config.pthreadLibs)
+ val linker = Option.getOpt (linker, (Settings.getCCompiler ()) ^ " -Werror" ^ opt ^ " " ^ Config.ccArgs ^ " " ^ Config.pthreadLibs)
val ssl = if Settings.getStaticLinking () then
Config.openssl ^ " -ldl -lz"