Browse thread
[Caml-list] Error during partial linking
-
Yang Shouxun
-
Xavier Leroy
-
Sven Luther
- Chris Hecker
- Xavier Leroy
- Yang Shouxun
-
Sven Luther
-
Xavier Leroy
[
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: | Chris Hecker <checker@d...> |
| Subject: | Re: [Caml-list] Error during partial linking |
>Also, i have the feeling that the correct way of distributing a bunch of >.cmo is to create a .cma, not to cram them together in a super .cmo >thanks to the pack option, i may be wrong about this though. No, if I understand the situation correctly, you actually want a packed cm[ox] (a new object), not a cmx?a (a library). This is because the libraries still require the discrete cmi files, while the packed object puts all the interfaces into a single cmi and scopes the names inside the packed namespace, which is obviously vastly superior for distribution. However, the issue with objects is whether the linker does the right thing with regards to throwing away unused code. In other words, if I have a library with a.cmo and b.cmo, and I only use module A, you won't get any of b.cmo in your app. However, if I use a packed object, c.cmo which has both as submodules, I don't know if it just includes everything or not. We should test this. The potential badness is even worse with the native code objects, becuase they're so much bigger. The right thing is obviously to have a "library" (quoted because it could be a packed object or a library) that allows merged code and interface files, nested namespaces, and also supports not linking unused code. However, -pack is still _way_ better than nothing, so I think we should all use it until the perfect solution comes along. Hopefully it'll be working on win32/msvc soon (I patched the compiler and sent the info to Xavier). Chris ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners