From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 4F077BC37 for ; Tue, 29 Sep 2009 20:36:32 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnYEAOfwwUqVnFmTgWdsb2JhbACaegEBFiStGIcbiEqEHgWCSw X-IronPort-AV: E=Sophos;i="4.44,475,1249250400"; d="scan'208";a="37114322" Received: from mail.uj.edu.pl ([149.156.89.147]) by mail1-smtp-roc.national.inria.fr with ESMTP; 29 Sep 2009 20:36:32 +0200 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=ISO-8859-2; format=flowed Received: from pfpleia.if.uj.edu.pl ([149.156.90.26]) by mail.uj.edu.pl (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPA id <0KQQ00HFAX0V13G0@mail.uj.edu.pl> for caml-list@yquem.inria.fr; Tue, 29 Sep 2009 20:36:31 +0200 (CEST) Message-id: <4AC25433.1060709@uj.edu.pl> Date: Tue, 29 Sep 2009 20:38:43 +0200 From: Dawid Toton User-Agent: Thunderbird 2.0.0.23 (X11/20090817) To: caml-list@yquem.inria.fr Subject: Incremental linking X-Spam: no; 0.00; cmx:01 associative:01 compiler:01 nodes:01 recompiled:01 ocamlopt:01 incremental:01 partial:01 partially:02 modules:02 modules:02 tree:02 tree:02 linking:02 linking:02 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 development. 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? Dawid