Browse thread
[Caml-list] Big executables from ocamlopt; dynamic libraries again
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Nicolas George <nicolas.george@e...> |
| Subject: | Re: [Caml-list] Big executables from ocamlopt; dynamic libraries again |
L'octidi 28 ventôse, an CCX, Tim Freeman a écrit : > I see the same sort of thing happening in /usr/lib/ocaml/stdlib.a, so > lablgtk is not alone there. If you make an object, you load oo.o from > stdlib.a, which defines an unrelated function that uses random > numbers, so static linking then grabs random.o. Something I dislike in OCaml since a lot of time is the mixing of modules of compilation units. Why should a module be in only one file? A solution to that could be an additionnal feature to the compiler: ocamlc -m -o module.cmi module1.cmi module2.cmi module3.cmi Then the module.cmi interface would hold all the values and types of module[123].cmi, along with a special information (like the external information): "to find the foobar value, you must look in the module2 module". So huge modules could be split into smaller compilation --and linking-- units.