summaryrefslogtreecommitdiff
path: root/src/compiler.sml
diff options
context:
space:
mode:
authorGravatar Eran Meir <eranmeir@gmail.com>2016-01-02 13:56:35 +0200
committerGravatar Eran Meir <eranmeir@gmail.com>2016-01-02 13:59:41 +0200
commit6747f5ff7d80001f112fd23af51a1275471f5bf0 (patch)
treeed4744430468c99054572d3dfa04e68a3575816b /src/compiler.sml
parent93cb1ae6e054471a464637a89fe8def57617487b (diff)
Untagle boot and static flags
Boot flag should build a dynamic executable but link urweb libraries statically (from build tree). This should fix the problem of not being able to build static executables on OSX.
Diffstat (limited to 'src/compiler.sml')
-rw-r--r--src/compiler.sml4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler.sml b/src/compiler.sml
index 5ac024d4..e2dc168e 100644
--- a/src/compiler.sml
+++ b/src/compiler.sml
@@ -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"