From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 64E3DBB9C for ; Wed, 30 Nov 2005 17:09:36 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id jAUG9ZLl020912 for ; Wed, 30 Nov 2005 17:09:36 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA11945 for ; Wed, 30 Nov 2005 17:09:35 +0100 (MET) Received: from mail14.bluewin.ch (mail14.bluewin.ch [195.186.19.62]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id jAUG9YbM018630 for ; Wed, 30 Nov 2005 17:09:35 +0100 Received: from [10.0.1.2] (83.78.44.68) by mail14.bluewin.ch (Bluewin 7.2.069.1) id 43853F010014D6FC for caml-list@inria.fr; Wed, 30 Nov 2005 16:09:34 +0000 Mime-Version: 1.0 (Apple Message framework v746.2) In-Reply-To: <4F70401E-AE91-4E5E-AF67-70FBDCC7C353@epfl.ch> References: <438D6B4D.1070004@univ-savoie.fr> <20051130.211930.102965761.garrigue@math.nagoya-u.ac.jp> <4F70401E-AE91-4E5E-AF67-70FBDCC7C353@epfl.ch> Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: quoted-printable From: =?ISO-8859-1?Q?Daniel_B=FCnzli?= Subject: Re: [Caml-list] How to compile different implementations of the same lib Date: Wed, 30 Nov 2005 17:09:56 +0100 To: caml-list X-Mailer: Apple Mail (2.746.2) X-Miltered: at nez-perce with ID 438DCEBF.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 438DCEBE.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; bunzli:01 buenzli:01 epfl:01 caml-list:01 lib:01 bunzli:01 cmx:01 cmi's:01 dependencies:01 inlining:01 cmx:01 inlining:01 lib:01 inlined:01 statically:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 Le 30 nov. 05 =E0 15:38, Daniel B=FCnzli a =E9crit : > Le 30 nov. 05 =E0 13:19, Jacques Garrigue a =E9crit : > >> Note that with native code you must be careful to compile without any >> .cmx around (only .cmi's), as this would induce dependencies on a >> specific version. This also means that you lose inlining (one major >> advantage of native code.) > > I don't understand this. Careful to compile what without which cmx =20 > around ? And where do you lose inlining ? Now I think I understand this. You mean when you compile client code =20 client.ml against the library. Then functions from the lib will not =20 be inlined in client code. This allows to switch implementations of =20 the library without recompiling client.ml. More precisely, if you =20 statically link with the lib you only need to relink and if you =20 dynamically link you don't even need to do anything, you can just =20 play with CAML_LD_LIBRARY_PATH. Right ? Daniel=