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=1.3 required=5.0 tests=SPF_FAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id BD713BC37 for ; Tue, 29 Sep 2009 20:37:01 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvkAAOfwwUrUTWUBkWdsb2JhbACBUZkpAQEBAQcNCgcTBLx5hB4Fgks X-IronPort-AV: E=Sophos;i="4.44,475,1249250400"; d="scan'208";a="35256999" Received: from smtp.wp.pl (HELO mx1.wp.pl) ([212.77.101.1]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 29 Sep 2009 20:37:01 +0200 Received: (wp-smtpd smtp.wp.pl 25674 invoked from network); 29 Sep 2009 20:36:58 +0200 Received: from pfpleia.if.uj.edu.pl (d0@[149.156.90.26]) (envelope-sender ) by smtp.wp.pl (WP-SMTPD) with AES256-SHA encrypted SMTP for ; 29 Sep 2009 20:36:58 +0200 Message-ID: <4AC2544E.1090501@wp.pl> Date: Tue, 29 Sep 2009 20:39:10 +0200 From: Dawid Toton User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: Incremental linking Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-WP-AV: skaner antywirusowy poczty Wirtualnej Polski S. A. X-WP-SPAM: NO 0000000 [oeOE] 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