caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Forced linking and Ocamlbuild
@ 2010-04-05 15:08 Dario Teixeira
  2010-04-05 15:41 ` [Caml-list] " Daniel Bünzli
  0 siblings, 1 reply; 3+ messages in thread
From: Dario Teixeira @ 2010-04-05 15:08 UTC (permalink / raw)
  To: caml-list

Hi,

I'm using Ocamlbuild with the findlib plugin listed on the Wiki.
In this setting, how does one force a given module to always be
linked into the final executable, even if it's not referenced
anywhere?  (I realise there's always the option of adding a
dummy reference, but I'm looking for a cleaner solution).

Note that the package is of course listed under "true" in the
top-level _tags file, but it's being pruned out from the actual
invocation of ocamlfind.  Normally this is a sensible approach,
but in this case I want to force linking.  Also, I've searched
into the (long) list of built-in tags, but couldn't find anything
resembling this purpose.

While I can of course explicitly change the myocamlbuild plugin
so that invocations of the compiler always append the module I
want to link, I wonder if there's not already a cleaner, more
general solution that I may have missed.

Thanks in advance!
Best regards,
Dario Teixeira






^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-04-05 16:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-05 15:08 Forced linking and Ocamlbuild Dario Teixeira
2010-04-05 15:41 ` [Caml-list] " Daniel Bünzli
2010-04-05 16:02   ` Dario Teixeira

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).