summaryrefslogtreecommitdiff
path: root/src/compiler.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2016-01-02 10:44:03 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2016-01-02 10:44:03 -0500
commitd47ffbc86c1cafb041588ab0ea7540c538196cb9 (patch)
treebb4af40404463ab02504a0bc219d994bed28ad7a /src/compiler.sml
parentaa3e615e84e3e8844fd5537ef84c38d5d18298ab (diff)
parent2db6f2680dc91cd32b7c76e354bc39fe5192c857 (diff)
Merge branch 'master' of ssh://github.com/urweb/urweb
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"