From 6747f5ff7d80001f112fd23af51a1275471f5bf0 Mon Sep 17 00:00:00 2001 From: Eran Meir Date: Sat, 2 Jan 2016 13:56:35 +0200 Subject: 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. --- src/compiler.sml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/compiler.sml') 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" -- cgit v1.2.3