English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Incremental linking
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-09-29 (18:36)
From: Dawid Toton <dawid.toton@u...>
Subject: Incremental linking
I have lot of modules and they are compiled to native code.
So I have .cmx and .o files and want to link them faster.

Is is possible to make linking an associative operation acting on modules?

I would like to do something like the following:
Knowing the correct partial order of modules (that compiler requires) I 
can create a tree that preserves that order. Leafs are modules. Other 
nodes of the tree correspond to a result of linking all descendant 
modules. Modules that are frequently recompiled are placed closer to the 
root. This way I expect to execute less linking operations during 

Documentation of ld says that files produced with --relocatable can be 
used as intermediate partially linked files. Can something like this be 
done with object code produced by ocamlopt?
I don't know ocaml-specific details of linking, so maybe I overlook some 
obvoius obstacle?