Re: [Caml-list] oasis packaging questions
Le Thu, 8 Mar 2012 01:26:38 +0100, Daniel Bünzli daniel.buen...@erratique.ch a écrit : 1) All the packages I distribute are made of a single module. For now these were just installed as .cmo .cmx .cmxs. Now it seems oasis forces me to create a .mllib even if I have only one module. Is that correct ? Note that in general it is better to install a cma/cmxa, even if your library has only one module. The reason is that when building an executable, cmo/cmx files passed on the command line are always linked, while unused units of cma/cmxa files are not (unless you specify -linkall). -- Jérémie -- Caml-list mailing list. Subscription management and archives: https://sympa-roc.inria.fr/wws/info/caml-list Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs
Re: [Caml-list] oasis packaging questions
Am Donnerstag, den 08.03.2012, 17:09 +0100 schrieb Jérémie Dimino: Le Thu, 8 Mar 2012 01:26:38 +0100, Daniel Bünzli daniel.buen...@erratique.ch a écrit : 1) All the packages I distribute are made of a single module. For now these were just installed as .cmo .cmx .cmxs. Now it seems oasis forces me to create a .mllib even if I have only one module. Is that correct ? Note that in general it is better to install a cma/cmxa, even if your library has only one module. The reason is that when building an executable, cmo/cmx files passed on the command line are always linked, while unused units of cma/cmxa files are not (unless you specify -linkall). Right. Just one refinement: if you also install the cmx _in addition to_ the cmxa, you enable cross-module inlining for this particular module. This is completely optional. I usually do it only when I think it makes sense. (Cannot comment on how this is handled in oasis.) Gerd -- Jérémie -- Gerd Stolpmann, Darmstadt, Germanyg...@gerd-stolpmann.de Creator of GODI and camlcity.org. Contact details:http://www.camlcity.org/contact.html Company homepage: http://www.gerd-stolpmann.de *** Searching for new projects! Need consulting for system *** programming in Ocaml? Gerd Stolpmann can help you. -- Caml-list mailing list. Subscription management and archives: https://sympa-roc.inria.fr/wws/info/caml-list Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs
Re: [Caml-list] oasis packaging questions
Le jeudi, 8 mars 2012 à 17:09, Jérémie Dimino a écrit : Note that in general it is better to install a cma/cmxa, even if your library has only one module. The reason is that when building an executable, cmo/cmx files passed on the command line are always linked, while unused units of cma/cmxa files are not (unless you specify -linkall). Okay, but is there a reasonable case (beyond sloppy dependency tracking) where you'd like to link against a *single module* library while not wanting to use it ? Daniel -- Caml-list mailing list. Subscription management and archives: https://sympa-roc.inria.fr/wws/info/caml-list Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs
Re: [Caml-list] oasis packaging questions
Le jeudi, 8 mars 2012 à 17:58, Jérémie Dimino a écrit : This may happen if you are using a subset of a multi-modules library which use a single-module one. Not completely unlikely I agree. I'll go with the cma then. Thanks, Daniel -- Caml-list mailing list. Subscription management and archives: https://sympa-roc.inria.fr/wws/info/caml-list Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs
Re: [Caml-list] oasis packaging questions
Le 08/03/2012 17:09, Jérémie Dimino a écrit : Note that in general it is better to install a cma/cmxa, even if your library has only one module. The reason is that when building an executable, cmo/cmx files passed on the command line are always linked, while unused units of cma/cmxa files are not (unless you specify -linkall). Moreover, in case of bindings, cma/cmxa can contain flags for the linker so that the end user doesn't have to specify them. Cheers, -- Stéphane -- Caml-list mailing list. Subscription management and archives: https://sympa-roc.inria.fr/wws/info/caml-list Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs