comparison src/settings.sml @ 1095:bed675db3aff

Dynamic linking of the runtime system
author Adam Chlipala <adamc@hcoop.net>
date Sun, 27 Dec 2009 13:18:32 -0500
parents b2311dfb3158
children 324c9ffe8ff9
comparison
equal deleted inserted replaced
1094:db52c32dbe42 1095:bed675db3aff
268 mime 268 mime
269 269
270 270
271 type protocol = { 271 type protocol = {
272 name : string, 272 name : string,
273 link : string, 273 linkStatic : string,
274 linkDynamic : string,
274 persistent : bool 275 persistent : bool
275 } 276 }
276 val protocols = ref ([] : protocol list) 277 val protocols = ref ([] : protocol list)
277 fun addProtocol p = protocols := p :: !protocols 278 fun addProtocol p = protocols := p :: !protocols
278 fun getProtocol s = List.find (fn p => #name p = s) (!protocols) 279 fun getProtocol s = List.find (fn p => #name p = s) (!protocols)
279 280
280 fun clibFile s = OS.Path.joinDirFile {dir = Config.libC, 281 fun clibFile s = OS.Path.joinDirFile {dir = Config.libC,
281 file = s} 282 file = s}
282 283
283 val curProto = ref {name = "", 284 val curProto = ref {name = "",
284 link = "", 285 linkStatic = "",
286 linkDynamic = "",
285 persistent = false} 287 persistent = false}
286 fun setProtocol name = 288 fun setProtocol name =
287 case getProtocol name of 289 case getProtocol name of
288 NONE => raise Fail ("Unknown protocol " ^ name) 290 NONE => raise Fail ("Unknown protocol " ^ name)
289 | SOME p => curProto := p 291 | SOME p => curProto := p
425 427
426 val monoInline = ref 20 428 val monoInline = ref 20
427 fun setMonoInline n = monoInline := n 429 fun setMonoInline n = monoInline := n
428 fun getMonoInline () = !monoInline 430 fun getMonoInline () = !monoInline
429 431
432 val staticLinking = ref false
433 fun setStaticLinking b = staticLinking := b
434 fun getStaticLinking () = !staticLinking
435
430 end 436 end