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 245ECBC37 for ; Tue, 29 Sep 2009 23:04:00 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvQAAOMSwkrU436xkWdsb2JhbACBUY4EiykBAQEBCQsKBxMDvGsChBwFgks X-IronPort-AV: E=Sophos;i="4.44,475,1249250400"; d="scan'208";a="37122550" Received: from moutng.kundenserver.de ([212.227.126.177]) by mail1-smtp-roc.national.inria.fr with ESMTP; 29 Sep 2009 23:03:59 +0200 Received: from office1.lan.sumadev.de (dslb-084-059-073-148.pools.arcor-ip.net [84.59.73.148]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0MhPmw-1Mety90lu6-00MxDq; Tue, 29 Sep 2009 23:03:59 +0200 Received: from [192.168.5.104] (dslb-084-059-073-148.pools.arcor-ip.net [84.59.73.148]) by office1.lan.sumadev.de (Postfix) with ESMTPSA id E354FC0EA0; Tue, 29 Sep 2009 23:03:58 +0200 (CEST) Subject: Re: [Caml-list] Incremental linking From: Gerd Stolpmann To: Dawid Toton Cc: caml-list@yquem.inria.fr In-Reply-To: <4AC2544E.1090501@wp.pl> References: <4AC2544E.1090501@wp.pl> Content-Type: text/plain Date: Tue, 29 Sep 2009 23:08:38 +0200 Message-Id: <1254258518.31721.4.camel@flake.lan.gerd-stolpmann.de> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX18Uj89H7cYJauK6rQdteQ9vOQ1j3mVSz0dpCqY 0Bg/vGp+qx9iXpqenM6sY8X6Lw1mxIjtvPCR0UndSIcu6nwYI+ /RwZOlSkvUdIfcg9oc8KA== X-Spam: no; 0.00; gerd:01 stolpmann:01 gerd:01 cmx:01 cmx:01 cmxa:01 ocamlopt:01 cmxa:01 associative:01 compiler:01 nodes:01 recompiled:01 ocamlopt:01 beginner's:01 ocaml:01 Am Dienstag, den 29.09.2009, 20:39 +0200 schrieb Dawid Toton: > 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. Well, you can link several .cmx files (and their accompanying .o files) to a .cmxa file (and an accompanying .a file): ocamlopt -a You cannot do the same again on the next level, i.e. link several .cmxa/.a together to get another .cmxa/.a. (I don't remember why this restriction exists.) Gerd > > 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 > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > -- ------------------------------------------------------------ Gerd Stolpmann, Bad Nauheimer Str.3, 64289 Darmstadt,Germany gerd@gerd-stolpmann.de http://www.gerd-stolpmann.de Phone: +49-6151-153855 Fax: +49-6151-997714 ------------------------------------------------------------